Skip to content

Commit

Permalink
Add support for the new "reply_markup" field in a Message object
Browse files Browse the repository at this point in the history
  • Loading branch information
camilo.sperberg committed Jun 5, 2019
1 parent bb375cb commit 2806d89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Telegram/Types/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use unreal4u\TelegramAPI\Telegram\Types\Custom\MessageEntityArray;
use unreal4u\TelegramAPI\Telegram\Types\Custom\PhotoSizeArray;
use unreal4u\TelegramAPI\Telegram\Types\Custom\UserArray;
use unreal4u\TelegramAPI\Telegram\Types\Inline\Keyboard\Markup;

/**
* This object represents a message.
Expand Down Expand Up @@ -292,6 +293,11 @@ class Message extends TelegramTypes
*/
public $connected_website = '';

/**
* @var Markup
*/
public $reply_markup;

/**
* A message may contain one or more subobjects, map them always in this function
*
Expand Down Expand Up @@ -347,6 +353,8 @@ protected function mapSubObjects(string $key, array $data): TelegramTypes
return new Invoice($data, $this->logger);
case 'successful_payment':
return new SuccessfulPayment($data, $this->logger);
case 'reply_markup':
return new Markup($data, $this->logger);
}

// Return always null if none of the objects above matches
Expand Down

0 comments on commit 2806d89

Please sign in to comment.