diff options
| author | levlam <levlam@telegram.org> | 2026-07-01 16:32:26 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2026-07-01 16:32:26 +0300 |
| commit | 6503a721d9b6da718a770c7ffd2e970f8120966d (patch) | |
| tree | 7676fe0b81ca8f86dd389397654b02e14176cfb9 /td | |
| parent | 5113b7d5387de5a1eadae84f45a6c62ac501b05c (diff) | |
Add Message.ephemeral_message_id for bots.
Diffstat (limited to 'td')
| -rw-r--r-- | td/generate/scheme/td_api.tl | 3 | ||||
| -rw-r--r-- | td/telegram/MessagesManager.cpp | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 9032aa6b9..ccdc771c0 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3088,7 +3088,8 @@ factCheck text:formattedText country_code:string = FactCheck; //@summary_language_code IETF language tag of the message language on which it can be summarized; empty if summary isn't available for the message //@content Content of the message //@reply_markup Reply markup for the message; may be null if none -message id:int53 sender_id:MessageSender receiver_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool is_from_offline:Bool can_be_saved:Bool has_timestamped_media:Bool is_channel_post:Bool is_paid_star_suggested_post:Bool is_paid_gram_suggested_post:Bool contains_unread_mention:Bool contains_unread_poll_votes:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> fact_check:factCheck suggested_post_info:suggestedPostInfo reply_to:MessageReplyTo topic_id:MessageTopic self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 guest_bot_caller_id:MessageSender sender_business_bot_user_id:int53 sender_boost_count:int32 sender_tag:string paid_message_star_count:int53 author_signature:string media_album_id:int64 effect_id:int64 restriction_info:restrictionInfo summary_language_code:string content:MessageContent reply_markup:ReplyMarkup = Message; +//@ephemeral_message_id Unique identifier of the ephemeral message if the message is ephemeral; for bots only +message id:int53 sender_id:MessageSender receiver_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool is_from_offline:Bool can_be_saved:Bool has_timestamped_media:Bool is_channel_post:Bool is_paid_star_suggested_post:Bool is_paid_gram_suggested_post:Bool contains_unread_mention:Bool contains_unread_poll_votes:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> fact_check:factCheck suggested_post_info:suggestedPostInfo reply_to:MessageReplyTo topic_id:MessageTopic self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 guest_bot_caller_id:MessageSender sender_business_bot_user_id:int53 sender_boost_count:int32 sender_tag:string paid_message_star_count:int53 author_signature:string media_album_id:int64 effect_id:int64 restriction_info:restrictionInfo summary_language_code:string content:MessageContent reply_markup:ReplyMarkup ephemeral_message_id:int32 = Message; //@description Contains a list of messages @total_count Approximate total number of messages found @messages List of messages; messages may be null diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index dd01690c0..61f19a3e3 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -20485,7 +20485,7 @@ td_api::object_ptr<td_api::message> MessagesManager::get_dialog_event_log_messag std::move(interaction_info), Auto(), nullptr, nullptr, std::move(reply_to), nullptr, nullptr, 0.0, 0.0, via_bot_user_id, get_message_guest_sender_object(m), 0, m->sender_boost_count, m->sender_rank, m->paid_message_star_count, m->author_signature, 0, 0, get_restriction_info_object(m->restriction_reasons), - m->summary_from_language, std::move(content), std::move(reply_markup)); + m->summary_from_language, std::move(content), std::move(reply_markup), 0); } td_api::object_ptr<td_api::businessMessage> MessagesManager::get_business_message_object( @@ -20559,7 +20559,7 @@ td_api::object_ptr<td_api::message> MessagesManager::get_guest_message_object( std::move(self_destruct_type), 0.0, 0.0, via_bot_user_id, get_message_guest_sender_object(m), via_business_bot_user_id, m->sender_boost_count, m->sender_rank, m->paid_message_star_count, m->author_signature, m->media_album_id, m->effect_id.get(), get_restriction_info_object(m->restriction_reasons), string(), - std::move(content), std::move(reply_markup)); + std::move(content), std::move(reply_markup), 0); } td_api::object_ptr<td_api::message> MessagesManager::get_message_object(Dialog *d, MessageId message_id, @@ -20657,6 +20657,7 @@ td_api::object_ptr<td_api::message> MessagesManager::get_message_object(DialogId auto receiver_id = m->receiver_user_id != UserId() ? get_message_sender_object_const(td_, m->receiver_user_id, DialogId(), source) : nullptr; + auto ephemeral_message_id = is_bot ? m->ephemeral_message_id.get() : 0; return td_api::make_object<td_api::message>( m->message_id.get(), std::move(sender), std::move(receiver_id), @@ -20669,7 +20670,7 @@ td_api::object_ptr<td_api::message> MessagesManager::get_message_object(DialogId auto_delete_in, via_bot_user_id, get_message_guest_sender_object(m), via_business_bot_user_id, m->sender_boost_count, m->sender_rank, m->paid_message_star_count, m->author_signature, m->media_album_id, m->effect_id.get(), get_restriction_info_object(m->restriction_reasons), m->summary_from_language, - std::move(content), std::move(reply_markup)); + std::move(content), std::move(reply_markup), ephemeral_message_id); } td_api::object_ptr<td_api::messages> MessagesManager::get_messages_object(int32 total_count, DialogId dialog_id, |
