mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user