Check that identifier of the edited topic wasn't changed.

This commit is contained in:
levlam 2022-10-27 20:03:57 +03:00
parent 431932eff2
commit af73084d1d

View File

@ -374,7 +374,9 @@ static td_api::object_ptr<td_api::ChatEventAction> get_chat_event_action_object(
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionEditTopic>(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()) {