Skip to content

Commit

Permalink
Changed not removed empty message (photo/video/audio)
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Mar 20, 2024
1 parent cc0346f commit feb60bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Services/TelegramBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public function deleteMessage($chatId, $messageId): Response
*/
public function isSpam(string $message): bool
{
if (empty($message)) {
return false;
}

$detector = new SpamDetector($message);

return $detector->isSpam();
Expand Down

0 comments on commit feb60bf

Please sign in to comment.