From 611878f09874f0f9bef9526750e74614356aa6e6 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 11 Aug 2019 01:23:34 +0300 Subject: [PATCH] Add is_bot_start_message flag. GitOrigin-RevId: 02725fba5857f1e8212b998eaf3c33006382fddb --- td/telegram/MessagesManager.cpp | 3 +++ td/telegram/MessagesManager.h | 1 + 2 files changed, 4 insertions(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index ff1d8722..93bf18b8 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -3611,6 +3611,7 @@ void MessagesManager::Message::store(StorerT &storer) const { STORE_FLAG(has_forward_sender_name); STORE_FLAG(has_send_error_code); STORE_FLAG(hide_via_bot); + STORE_FLAG(is_bot_start_message); END_STORE_FLAGS(); } @@ -3745,6 +3746,7 @@ void MessagesManager::Message::parse(ParserT &parser) { PARSE_FLAG(has_forward_sender_name); PARSE_FLAG(has_send_error_code); PARSE_FLAG(hide_via_bot); + PARSE_FLAG(is_bot_start_message); END_PARSE_FLAGS(); } @@ -16958,6 +16960,7 @@ Result MessagesManager::send_bot_start_message(UserId bot_user_id, Di Message *m = get_message_to_send(d, MessageId(), false, false, create_text_message_content(text, std::move(text_entities), WebPageId()), &need_update_dialog_pos); + m->is_bot_start_message = true; send_update_new_message(d, m); if (need_update_dialog_pos) { diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index 8c8c3379..8395a4ac 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -882,6 +882,7 @@ class MessagesManager : public Actor { bool clear_draft = false; // for send_message bool in_game_share = false; // for send_message bool hide_via_bot = false; // for resend_message + bool is_bot_start_message = false; // for resend_message bool have_previous = false; bool have_next = false;