From 630f0c38d1237f9b40a94c1711480ddba1940e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20L=C3=BCscher?= Date: Sat, 5 Jan 2019 19:23:28 +0100 Subject: [PATCH] Add missing `Request::editMessageMedia()` and `CallbackQuery::getChatInstance()` methods. Fixes #915 --- CHANGELOG.md | 1 + src/Entities/CallbackQuery.php | 1 + src/Request.php | 3 +++ 3 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 500a684a8..bda983c09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c ## [Unreleased] ### Added +- Add missing `Request::editMessageMedia()` and `CallbackQuery::getChatInstance()` methods. ### Changed ### Deprecated ### Removed diff --git a/src/Entities/CallbackQuery.php b/src/Entities/CallbackQuery.php index 5bd5cb298..f870532ab 100644 --- a/src/Entities/CallbackQuery.php +++ b/src/Entities/CallbackQuery.php @@ -21,6 +21,7 @@ * @method User getFrom() Sender * @method Message getMessage() Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old * @method string getInlineMessageId() Optional. Identifier of the message sent via the bot in inline mode, that originated the query + * @method string getChatInstance() Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. * @method string getData() Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field * @method string getGameShortName() Optional. Short name of a Game to be returned, serves as the unique identifier for the game */ diff --git a/src/Request.php b/src/Request.php index f0425232d..4d294ab07 100644 --- a/src/Request.php +++ b/src/Request.php @@ -65,6 +65,7 @@ * @method static ServerResponse answerInlineQuery(array $data) Use this method to send answers to an inline query. On success, True is returned. * @method static ServerResponse editMessageText(array $data) Use this method to edit text and game messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned. * @method static ServerResponse editMessageCaption(array $data) Use this method to edit captions of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned. + * @method static ServerResponse editMessageMedia(array $data) Use this method to edit audio, document, photo, or video messages. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned. * @method static ServerResponse editMessageReplyMarkup(array $data) Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned. * @method static ServerResponse deleteMessage(array $data) Use this method to delete a message, including service messages, with certain limitations. Returns True on success. * @method static ServerResponse getStickerSet(array $data) Use this method to get a sticker set. On success, a StickerSet object is returned. @@ -181,6 +182,7 @@ class Request 'answerInlineQuery', 'editMessageText', 'editMessageCaption', + 'editMessageMedia', 'editMessageReplyMarkup', 'deleteMessage', 'getStickerSet', @@ -684,6 +686,7 @@ private static function limitTelegramRequests($action, array $data = []) 'setGameScore', 'editMessageText', 'editMessageCaption', + 'editMessageMedia', 'editMessageReplyMarkup', 'setChatTitle', 'setChatDescription',