From 1ca86b0c759b8e422f3214795c262bac7d393241 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 1 Nov 2023 22:39:35 +0300 Subject: [PATCH] Fix message_id checks before accessing input_reply_to. --- td/telegram/MessagesManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index eb8b88e4a..f1f3bf507 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -24595,7 +24595,7 @@ MessagesManager::ForwardedMessageInfo MessagesManager::get_forwarded_message_inf const MessageInputReplyTo *MessagesManager::get_message_input_reply_to(const Message *m) { CHECK(m != nullptr); - CHECK(!m->message_id.is_server()); + CHECK(!m->message_id.is_any_server()); return &m->input_reply_to; } @@ -39286,7 +39286,7 @@ void MessagesManager::set_message_reply(const Dialog *d, Message *m, MessageInpu m->reply_to_random_id = replied_m->random_id; } } - if (!m->message_id.is_server()) { + if (!m->message_id.is_any_server()) { m->input_reply_to = std::move(input_reply_to); } if (is_message_in_dialog) { @@ -39303,7 +39303,7 @@ void MessagesManager::update_message_reply_to_message_id(const Dialog *d, Messag unregister_message_reply(d->dialog_id, m); } m->replied_message_info.set_message_id(reply_to_message_id); - if (!m->message_id.is_server()) { + if (!m->message_id.is_any_server()) { m->input_reply_to.set_message_id(reply_to_message_id); } if (is_message_in_dialog) {