Skip to content

Commit

Permalink
CommandsHandler FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Stajor committed Sep 19, 2019
1 parent d6ea934 commit a2f537d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
composer.lock
/vendor/
/.idea
/tests/.env
/tests/.env
/.phpunit.result.cache
4 changes: 3 additions & 1 deletion src/CommandsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ private function getCommand(Payload $payload, string $command = null): ?Command
if (is_null($command)) {
if (!empty($payload->getInlineQuery())) {
$messageText = $payload->getInlineQuery()->query;
} else {
} elseif (!empty($payload->getMessage())) {
$messageText = $payload->getMessage()->text;
} else {
$messageText = null;
}

$queryText = is_null($payload->getCallbackQuery()) ? null : $payload->getCallbackQuery()->data;
Expand Down

0 comments on commit a2f537d

Please sign in to comment.