From 8094d415db18d0b01337cfe74ecd36ff387cfd91 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 26 Jul 2019 03:40:40 +0300 Subject: [PATCH] Add support for animated stickers in inline bot results. GitOrigin-RevId: a25f45ef24aad2e92d461718a6f3b0ba101cdd76 --- td/generate/scheme/td_api.tl | 4 ++-- td/telegram/InlineQueriesManager.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 1bd918ddc..695fe8d45 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1703,8 +1703,8 @@ inputInlineQueryResultLocation id:string location:location live_period:int32 tit //@input_message_content The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact inputInlineQueryResultPhoto id:string title:string description:string thumbnail_url:string photo_url:string photo_width:int32 photo_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; -//@description Represents a link to a WEBP sticker @id Unique identifier of the query result @thumbnail_url URL of the sticker thumbnail, if it exists -//@sticker_url The URL of the WEBP sticker (sticker file size must not exceed 5MB) @sticker_width Width of the sticker @sticker_height Height of the sticker +//@description Represents a link to a WEBP or a TGS sticker @id Unique identifier of the query result @thumbnail_url URL of the sticker thumbnail, if it exists +//@sticker_url The URL of the WEBP or a TGS sticker (sticker file size must not exceed 5MB) @sticker_width Width of the sticker @sticker_height Height of the sticker //@reply_markup The message reply markup. Must be of type replyMarkupInlineKeyboard or null //@input_message_content The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact inputInlineQueryResultSticker id:string thumbnail_url:string sticker_url:string sticker_width:int32 sticker_height:int32 reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult; diff --git a/td/telegram/InlineQueriesManager.cpp b/td/telegram/InlineQueriesManager.cpp index 2bf9c5706..24d3800c0 100644 --- a/td/telegram/InlineQueriesManager.cpp +++ b/td/telegram/InlineQueriesManager.cpp @@ -535,7 +535,7 @@ void InlineQueriesManager::answer_inline_query(int64 inline_query_id, bool is_pe id = std::move(sticker->id_); thumbnail_url = std::move(sticker->thumbnail_url_); content_url = std::move(sticker->sticker_url_); - content_type = "image/webp"; + content_type = "image/webp"; // or "application/x-tgsticker"; not used for previously uploaded files width = sticker->sticker_width_; height = sticker->sticker_height_; is_gallery = true;