Edit text and links, mute and unmute chat

This commit is contained in:
2026-09-30 14:58:44 +03:30
parent d3986da28b
commit 75b83b7f1b
9 changed files with 1070 additions and 51 deletions
@@ -15,6 +15,8 @@ import {
RemoveConversationRoomMemberDto,
UpdateConversationRoomMemberRoleDto,
ConversationTypingDto,
MuteConversationRoomDto,
ToggleMessageReactionDto,
} from './dto';
import { ConversationsService } from './conversations.service';
@@ -186,6 +188,49 @@ export class ConversationsController {
);
}
@Post('rooms/mute')
muteRoom(
@CurrentUser() user: { userId: string; organizationId: string; role: string },
@Body() dto: MuteConversationRoomDto,
) {
return this.conversations.setRoomMuted(
user.userId,
user.organizationId,
user.role,
dto.externalRoomId,
dto.muted,
dto.allowMentions !== false,
);
}
@Get('messages/reactions')
listReactions(
@CurrentUser() user: { userId: string; organizationId: string; role: string },
@Query('externalRoomId') externalRoomId: string,
) {
return this.conversations.listMessageReactions(
user.userId,
user.organizationId,
user.role,
externalRoomId || '',
);
}
@Post('messages/reactions')
toggleReaction(
@CurrentUser() user: { userId: string; organizationId: string; role: string },
@Body() dto: ToggleMessageReactionDto,
) {
return this.conversations.toggleMessageReaction(
user.userId,
user.organizationId,
user.role,
dto.externalRoomId,
dto.messageId,
dto.emoji,
);
}
@Post('messages/hide')
hideMessages(
@CurrentUser() user: { userId: string; organizationId: string; role: string },