feat: add notifier Sender interface and digest formatter

This commit is contained in:
2026-07-19 22:28:41 +03:00
parent 0635ca8a87
commit 3af33bd728
4 changed files with 264 additions and 4 deletions

View File

@@ -107,10 +107,10 @@ name collisions.)
- [x] run tests - must pass before task 5
### Task 5: Notifier — Telegram sender + digest
- [ ] define `Sender` interface (`Send(ctx, message string) error`) and a `telegramSender` using `TelegramConfig` (bot API `sendMessage`)
- [ ] add `FormatDigest(missing []scanner.MissingRelease, uiBaseURL string) string` (artist names + counts + Web UI link)
- [ ] write tests: digest formatting, sender failure handling (stub sender)
- [ ] run tests - must pass before task 6
- [x] define `Sender` interface (`Send(ctx, message string) error`) and a `telegramSender` using `TelegramConfig` (bot API `sendMessage`)
- [x] add `FormatDigest(missing []scanner.MissingRelease, uiBaseURL string) string` (artist names + counts + Web UI link)
- [x] write tests: digest formatting, sender failure handling (stub sender)
- [x] run tests - must pass before task 6
### Task 6: Notifier — scheduler + sent-tracking
- [ ] add `NotifyOnce(ctx, db, sender, cfg)` : query `GetUnnotifiedReleases`, build digest, send, `MarkNotificationSent` per rgid