Fix scheduled posts only broadcasting to first room

All scheduled post dedup keys (wotd, holidays, gaming, anime, movies,
concerts, birthdays) were global — after posting to the first room,
the job was marked complete and the second room was skipped. Fixed by
including the room ID in each dedup key so posts go to all broadcast
rooms. Birthday XP grants and DMs remain once-per-user-per-year.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-03-09 00:09:11 -07:00
parent c1cca5ae12
commit 2c191ec464
7 changed files with 47 additions and 42 deletions

View File

@@ -445,7 +445,7 @@ func (p *AnimePlugin) handleUpcoming(ctx MessageContext) error {
// PostDailyReleases checks broadcast days and DMs watchers about anime airing today.
// Intended to be called by the scheduler daily.
func (p *AnimePlugin) PostDailyReleases(roomID id.RoomID) {
todayKey := time.Now().UTC().Format("2006-01-02")
todayKey := fmt.Sprintf("%s:%s", time.Now().UTC().Format("2006-01-02"), roomID)
if db.JobCompleted("anime_releases", todayKey) {
slog.Info("anime: already sent daily releases", "date", todayKey)
return