Добавьте S3-вложения с дедупликацией и безопасной сверкой хранилищ

This commit is contained in:
2026-11-16 12:36:59 +03:00
parent b323f2dab9
commit d761861def
54 changed files with 5061 additions and 102 deletions
+3 -2
View File
@@ -78,15 +78,16 @@ type MessagePayload struct {
ChatID uuid.UUID
IdempotencyKey string
Text string
AttachmentIDs []uuid.UUID
}
// Send checks access and the text on every attempt, a replay included, as the
// Send checks access and content on every attempt, a replay included, as the
// contract requires of a repeat.
func (s *Service) Send(ctx context.Context, actor uuid.UUID, p MessagePayload) (Message, error) {
if err := s.requireMember(ctx, actor, p.ChatID); err != nil {
return Message{}, err
}
message, err := NewMessage(ident.New(), p.ChatID, actor, p.Text)
message, err := NewMessage(ident.New(), p.ChatID, actor, p.Text, p.AttachmentIDs...)
if err != nil {
return Message{}, err
}