Skip to content

Commit

Permalink
Changed allow checked message caption
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Mar 20, 2024
1 parent b2f94b4 commit a35ed44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/WebHookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class WebHookController extends Controller
*/
public function telegram(Request $request, TelegramBot $telegramBot): void
{
$text = $request->input('message.text');
$text = $request->input('message.text') ?? $request->input('message.caption');
$messageId = $request->input('message.message_id');
$chatId = $request->input('message.chat.id');
$from = $request->input('message.from.id');
Expand Down
4 changes: 2 additions & 2 deletions app/Services/TelegramBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ public function deleteMessage($chatId, $messageId): Response
/**
* Check if a message is spam.
*
* @param string $message
* @param string|null $message
*
* @return bool
*/
public function isSpam(string $message): bool
public function isSpam(?string $message): bool
{
if (empty($message)) {
return false;
Expand Down

0 comments on commit a35ed44

Please sign in to comment.