Commit 632a4d08 authored by Armando Lüscher's avatar Armando Lüscher Committed by GitHub

Merge pull request #274 from noplanman/263-fix_handle_return_value

Fix return value for handle() method.
parents a0c0c0e8 240a4e9f
......@@ -324,6 +324,8 @@ class Telegram
* Handle bot request from webhook
*
* @return bool
*
* @throws \Longman\TelegramBot\Exception\TelegramException
*/
public function handle()
{
......@@ -337,7 +339,11 @@ class Telegram
throw new TelegramException('Invalid JSON!');
}
return $this->processUpdate(new Update($post, $this->bot_name))->isOk();
if ($response = $this->processUpdate(new Update($post, $this->bot_name))) {
return $response->isOk();
}
return false;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment