Skip to content

Commit

Permalink
delete keyboard before checking task to make sure that keyboard will …
Browse files Browse the repository at this point in the history
…be deleted even if task is not found
  • Loading branch information
pavelpilyak committed Oct 9, 2023
1 parent 2cfe013 commit 5ae07b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Webhooks/TelegramBotHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public function checkAsDone(): void
$chatId = $this->chat->chat_id;
$messageId = $this->callbackQuery->message()->id();

$this->service->checkTaskAsDone((int)$id, $chatId);

$this->chat->deleteKeyboard($messageId)->send();

$this->service->checkTaskAsDone((int)$id, $chatId);
}
}

0 comments on commit 5ae07b8

Please sign in to comment.