From: Daniel Karbach Date: Fri, 11 Jul 2025 13:17:08 +0000 (+0200) Subject: prevent pushing events from the past X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;h=ddfaf96905ea2b1805b248f4c40388629756df59;p=alttp.git prevent pushing events from the past --- diff --git a/app/Console/Commands/DiscordEpisodeSubscriptionsCommand.php b/app/Console/Commands/DiscordEpisodeSubscriptionsCommand.php index 0ae19e9..c663163 100644 --- a/app/Console/Commands/DiscordEpisodeSubscriptionsCommand.php +++ b/app/Console/Commands/DiscordEpisodeSubscriptionsCommand.php @@ -93,7 +93,7 @@ class DiscordEpisodeSubscriptionsCommand extends Command } } $memo = $this->getMemo($guild, $episode); - if (is_null($memo->synced_at) || $memo->synced_at < $mtime) { + if ((is_null($memo->synced_at) && $episode->start < now()) || $memo->synced_at < $mtime) { $this->line('pushing '.$episode->id.' '.$episode->getScheduledEventName()); DiscordBotCommand::episodeEvent($guild, $episode); }