feat(guild): closed channel (discussion-complete support)
Channel.closed; POST /channels/:id/close (member-only); message/command
posts on closed channel -> 409 {error:channel_closed}; GET history still
allowed; listForUser carries closed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,4 +54,11 @@ export class ChannelsController {
|
||||
if (!userId) throw new UnauthorizedException('missing user');
|
||||
return this.channelsService.leaveChannel(channelId, userId);
|
||||
}
|
||||
|
||||
@Post(':id/close')
|
||||
close(@Req() req: AuthedRequest, @Param('id') channelId: string) {
|
||||
const userId = req.userId ?? '';
|
||||
if (!userId) throw new UnauthorizedException('missing user');
|
||||
return this.channelsService.closeChannel(channelId, userId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user