Skip to content

Commit

Permalink
Fixing previous code, Improvements in BotSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
Muaath5 committed Nov 1, 2021
1 parent 477e914 commit e88e119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TelegramBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ public function OnWebhookUpdate() : bool

public function ReceiveUpdates(int $limit = 100, int $offset = 0) : bool
{
if ($this->Settings->AutoHandleDuplicateUpdates)
if ($this->Settings->HandleDuplicateUpdatesLevel)
{
# If sooner than 2 weeks
if ($this->Settings->LastUpdateDate >= strtotime('-2 week'))
if ($this->Settings->LastUpdateDate >= strtotime('-1 week'))
{
$offset = $this->Settings->LastUpdateID + 1;
}
Expand Down

0 comments on commit e88e119

Please sign in to comment.