Skip to content

Commit

Permalink
added checks for inline query checker
Browse files Browse the repository at this point in the history
  • Loading branch information
iGusev committed Jan 10, 2016
1 parent 113e18f commit c9f97a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,12 @@ protected static function getEvent(Closure $action)
protected static function getInlineQueryEvent(Closure $action)
{
return function (Update $update) use ($action) {
if (!$update->getInlineQuery()) {
return true;
}

$reflectionAction = new ReflectionFunction($action);
$reflectionAction->invokeArgs([$update->getInlineQuery()]);

return false;
};
}
Expand Down

0 comments on commit c9f97a9

Please sign in to comment.