Skip to content

Commit

Permalink
Update TelegramDriver.php (#42)
Browse files Browse the repository at this point in the history
Fixed issue #41.
  • Loading branch information
tasselchof authored and mpociot committed May 2, 2018
1 parent e42d0de commit cba2774
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/TelegramDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ class TelegramDriver extends HttpDriver
public function buildPayload(Request $request)
{
$this->payload = new ParameterBag((array) json_decode($request->getContent(), true));
$this->event = Collection::make($this->payload->get('message'));

$message = $this->payload->get('message');
if (empty($message)) {
$message = $this->payload->get('edited_message');
}
$this->event = Collection::make($message);
$this->config = Collection::make($this->config->get('telegram'));
$this->queryParameters = Collection::make($request->query);
}
Expand Down

0 comments on commit cba2774

Please sign in to comment.