feat(mom): backfill missed messages on startup using conversations.history API

- Add getLastTimestamp() to ChannelStore to read last ts from log.jsonl
- Add backfillChannel() to fetch up to 3 pages (3000 messages) per channel
- Add backfillAllChannels() called in start() before socket connection
- Include mom's own messages (as bot) and user messages, exclude other bots
- Process attachments from backfilled messages
- Add logging: logBackfillStart, logBackfillChannel, logBackfillComplete
- Warn if attachment missing name instead of failing

fixes #103
This commit is contained in:
Mario Zechner 2025-12-03 22:05:13 +01:00
parent 1517e64869
commit f02194296d
4 changed files with 164 additions and 3 deletions

View file

@ -2,6 +2,15 @@
## [Unreleased]
### Added
- Message backfill on startup (#103)
- Fetches missed messages from Slack using `conversations.history` API when mom restarts
- Backfills up to 3 pages (3000 messages) per channel since last logged timestamp
- Includes mom's own responses and user messages (excludes other bots)
- Downloads attachments from backfilled messages
- Logs progress: channel count, per-channel message counts, total with duration
## [0.10.2] - 2025-11-27
### Breaking Changes