From bdb3088a0c0b1db199ded18f15ccb13f336040dd Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 26 Feb 2024 18:18:53 +0300 Subject: [PATCH] Add quickReplyShortcut.id. --- td/generate/scheme/td_api.tl | 3 ++- td/telegram/QuickReplyManager.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index d0fef5650..2f925854e 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3747,10 +3747,11 @@ storyInteractions total_count:int32 total_forward_count:int32 total_reaction_cou quickReplyMessage id:int53 sending_state:MessageSendingState can_be_edited:Bool forward_info:messageForwardInfo reply_to_message_id:int53 via_bot_user_id:int53 media_album_id:int64 content:MessageContent = QuickReplyMessage; //@description Describes a shortcut that can be used for a quick reply +//@id Unique shortcut identifier //@name The name of the shortcut that can be used to use the shortcut //@first_message The first shortcut message //@message_count The total number of messages in the shortcut -quickReplyShortcut name:string first_message:quickReplyMessage message_count:int32 = QuickReplyShortcut; +quickReplyShortcut id:int32 name:string first_message:quickReplyMessage message_count:int32 = QuickReplyShortcut; //@class PublicForward @description Describes a public forward or repost of a story diff --git a/td/telegram/QuickReplyManager.cpp b/td/telegram/QuickReplyManager.cpp index 446b678a2..28257e4ae 100644 --- a/td/telegram/QuickReplyManager.cpp +++ b/td/telegram/QuickReplyManager.cpp @@ -528,8 +528,9 @@ td_api::object_ptr QuickReplyManager::get_quick_repl const Shortcut *s, const char *source) const { CHECK(s != nullptr); CHECK(!s->messages_.empty()); - return td_api::make_object( - s->name_, get_quick_reply_message_object(s->messages_[0].get(), source), get_shortcut_message_count(s)); + return td_api::make_object(s->shortcut_id_.get(), s->name_, + get_quick_reply_message_object(s->messages_[0].get(), source), + get_shortcut_message_count(s)); } void QuickReplyManager::get_quick_reply_shortcuts(Promise &&promise) {