feat: add notifier Sender interface and digest formatter
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user