Skip to content

Commit

Permalink
fix:チャンネルの共同編集者を0名にできない問題を修正 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Suzulu-activity authored Sep 18, 2024
1 parent 412ec6f commit 8cc80cd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/backend/src/server/api/endpoints/channels/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
})).map(u => u.id);
}

if ( !( channel.userId === me.id || iAmModerator ) ) {
collaboratorIds = channel.collaboratorIds;
};

const updateValues = {
...(ps.name !== undefined ? { name: ps.name } : {}),
...(ps.description !== undefined ? { description: ps.description } : {}),
Expand All @@ -142,7 +138,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
...(typeof ps.isSensitive === 'boolean' ? { isSensitive: ps.isSensitive } : {}),
...(typeof ps.allowRenoteToExternal === 'boolean' ? { allowRenoteToExternal: ps.allowRenoteToExternal } : {}),
...(typeof ps.isLocalOnly === 'boolean' ? { isLocalOnly: ps.isLocalOnly } : {}),
...(collaboratorIds.length > 0 ? { collaboratorIds: collaboratorIds } : {}),
...((ps.collaboratorIds !== undefined && ( channel.userId === me.id || iAmModerator )) ? { collaboratorIds: collaboratorIds } : {}),
};

if (Object.keys(updateValues).length > 0) {
Expand Down

0 comments on commit 8cc80cd

Please sign in to comment.