chore(lab5): remove stale templates and refresh source comments

This commit is contained in:
Mikhail Verkovykh
2026-11-20 19:05:23 +03:00
parent fec2882c9a
commit 1ce93185af
49 changed files with 33 additions and 5324 deletions
+4 -4
View File
@@ -78,7 +78,7 @@ func (s *Store) CreateMessage(ctx context.Context, chatID, senderID uuid.UUID, t
return model.Message{}, dbError(scanErr)
}
found++
// Lab5: a queued/processing attachment is already linked to its
// A queued/processing attachment is already linked to its
// chat and may be sent. Only a terminal failed one is refused.
if status == "failed" {
rows.Close()
@@ -159,9 +159,9 @@ func canonicalAttachmentIDs(ids []uuid.UUID) []uuid.UUID {
return result
}
// messageFingerprint keeps the lab3 hash for messages without attachments, so
// an idempotency key stored before this migration still replays correctly. For
// messages with attachments the sorted IDs are part of the canonical body.
// messageFingerprint keeps the legacy hash for messages without attachments,
// so an idempotency key stored before this migration still replays correctly.
// For messages with attachments the sorted IDs are part of the canonical body.
func messageFingerprint(text string, attachmentIDs []uuid.UUID) []byte {
if len(attachmentIDs) == 0 {
sum := sha256.Sum256([]byte(text))