feat: add attachment download and message attachment links

This commit is contained in:
2026-11-05 15:23:15 +03:00
parent fa0211eecb
commit f523cad721
10 changed files with 486 additions and 17 deletions
+7 -1
View File
@@ -36,7 +36,13 @@ export class MessagesController {
@CurrentUser() user: User,
): Promise<MessageResponse> {
const key = parseIdempotencyKey(keyRaw);
const message = await this.messages.create(chatId, user.id, dto.text, key);
const message = await this.messages.create(
chatId,
user.id,
dto.text,
(dto.attachment_ids ?? []).map((id) => id.toLowerCase()),
key,
);
return toMessageResponse(message);
}