4 Commits
Author SHA1 Message Date
dizi 771882427c ci: verify and deploy lab4
CI / verify (pull_request) Failing after 5m58s
2026-10-02 20:07:06 +03:00
dizi 4cec8f1c5a ops: add private object storage 2026-10-02 20:07:06 +03:00
dizi 6a29caf911 test: verify attachment consistency and memory 2026-10-02 19:59:47 +03:00
dizi efaeb593e8 feat: add S3 attachments and reconciliation 2026-10-02 19:55:52 +03:00
+1 -5
View File
@@ -26,9 +26,6 @@ func (s *Store) CreateMessage(
idempotencyKey string,
idempotencyTTL time.Duration,
) (model.Message, bool, error) {
if attachmentIDs == nil {
attachmentIDs = []string{}
}
var (
tx pgx.Tx
err error
@@ -304,8 +301,7 @@ func insertMessage(
if err := insertMessageAttachments(ctx, tx, messageID, chatID, attachmentIDs); err != nil {
return model.Message{}, err
}
message.AttachmentIDs = make([]string, len(attachmentIDs))
copy(message.AttachmentIDs, attachmentIDs)
message.AttachmentIDs = append([]string(nil), attachmentIDs...)
return message, nil
}