From af73084d1d8b10191d128efc9f6214462ba714db Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 27 Oct 2022 20:03:57 +0300 Subject: [PATCH] Check that identifier of the edited topic wasn't changed. --- td/telegram/DialogEventLog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/td/telegram/DialogEventLog.cpp b/td/telegram/DialogEventLog.cpp index 0341b87e2..079061804 100644 --- a/td/telegram/DialogEventLog.cpp +++ b/td/telegram/DialogEventLog.cpp @@ -374,7 +374,9 @@ static td_api::object_ptr get_chat_event_action_object( auto action = move_tl_object_as(action_ptr); auto old_topic_info = ForumTopicInfo(action->prev_topic_); auto new_topic_info = ForumTopicInfo(action->new_topic_); - if (old_topic_info.is_empty() || new_topic_info.is_empty()) { + if (old_topic_info.is_empty() || new_topic_info.is_empty() || + old_topic_info.get_thread_id() != new_topic_info.get_thread_id()) { + LOG(ERROR) << "Receive " << to_string(action); return nullptr; } if (old_topic_info.is_closed() != new_topic_info.is_closed()) {