diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 05aea7cd4..f9cbdfa13 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3031,6 +3031,9 @@ chatEventForumTopicEdited old_topic_info:forumTopicInfo new_topic_info:forumTopi //@description A forum topic was closed or reopened @topic_info New information about the topic chatEventForumTopicToggleIsClosed topic_info:forumTopicInfo = ChatEventAction; +//@description The General forum topic was hidden or unhidden @topic_info New information about the topic +chatEventForumTopicToggleIsHidden topic_info:forumTopicInfo = ChatEventAction; + //@description A forum topic was deleted @topic_info Information about the topic chatEventForumTopicDeleted topic_info:forumTopicInfo = ChatEventAction; diff --git a/td/telegram/DialogEventLog.cpp b/td/telegram/DialogEventLog.cpp index e0bf7b9c2..971f49dce 100644 --- a/td/telegram/DialogEventLog.cpp +++ b/td/telegram/DialogEventLog.cpp @@ -380,6 +380,12 @@ static td_api::object_ptr get_chat_event_action_object( LOG(ERROR) << "Receive " << to_string(action); return nullptr; } + bool edit_is_closed = old_topic_info.is_closed() != new_topic_info.is_closed(); + bool edit_is_hidden = old_topic_info.is_hidden() != new_topic_info.is_hidden(); + if (edit_is_hidden && !(!new_topic_info.is_hidden() && edit_is_closed && !new_topic_info.is_closed())) { + return td_api::make_object( + new_topic_info.get_forum_topic_info_object(td)); + } if (old_topic_info.is_closed() != new_topic_info.is_closed()) { return td_api::make_object( new_topic_info.get_forum_topic_info_object(td));