feat: implement S3 attachments and presigned uploads

This commit is contained in:
sinveria
2026-11-10 12:08:50 +03:00
parent aaa834e412
commit d96d4a2836
50 changed files with 3138 additions and 72 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ def message_to_response(message) -> MessageResponse:
return MessageResponse(
id=str(message.id), chat_id=str(message.chat_id),
sender_id=str(message.sender_id), text=message.text,
created_at=message.created_at,
created_at=message.created_at, attachment_ids=message.attachment_ids or [],
)
@@ -44,7 +44,7 @@ def create_message(
try:
message = MessageService(db).create_message(
chat_id=parsed_id, sender_id=user.id, text=body.text,
idempotency_key=idempotency_key,
idempotency_key=idempotency_key, attachment_ids=body.attachment_ids,
)
return message_to_response(message)
except MessageNotFoundError: