Skip to content

Commit 2806d89

Browse files
author
camilo.sperberg
committed
Add support for the new "reply_markup" field in a Message object
1 parent bb375cb commit 2806d89

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Telegram/Types/Message.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use unreal4u\TelegramAPI\Telegram\Types\Custom\MessageEntityArray;
99
use unreal4u\TelegramAPI\Telegram\Types\Custom\PhotoSizeArray;
1010
use unreal4u\TelegramAPI\Telegram\Types\Custom\UserArray;
11+
use unreal4u\TelegramAPI\Telegram\Types\Inline\Keyboard\Markup;
1112

1213
/**
1314
* This object represents a message.
@@ -292,6 +293,11 @@ class Message extends TelegramTypes
292293
*/
293294
public $connected_website = '';
294295

296+
/**
297+
* @var Markup
298+
*/
299+
public $reply_markup;
300+
295301
/**
296302
* A message may contain one or more subobjects, map them always in this function
297303
*
@@ -347,6 +353,8 @@ protected function mapSubObjects(string $key, array $data): TelegramTypes
347353
return new Invoice($data, $this->logger);
348354
case 'successful_payment':
349355
return new SuccessfulPayment($data, $this->logger);
356+
case 'reply_markup':
357+
return new Markup($data, $this->logger);
350358
}
351359

352360
// Return always null if none of the objects above matches

0 commit comments

Comments
 (0)