Add chatEventForumTopicToggleIsHidden.
This commit is contained in:
parent
f6e8e85547
commit
7c4ec3cffa
@ -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
|
//@description A forum topic was closed or reopened @topic_info New information about the topic
|
||||||
chatEventForumTopicToggleIsClosed topic_info:forumTopicInfo = ChatEventAction;
|
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
|
//@description A forum topic was deleted @topic_info Information about the topic
|
||||||
chatEventForumTopicDeleted topic_info:forumTopicInfo = ChatEventAction;
|
chatEventForumTopicDeleted topic_info:forumTopicInfo = ChatEventAction;
|
||||||
|
|
||||||
|
@ -380,6 +380,12 @@ static td_api::object_ptr<td_api::ChatEventAction> get_chat_event_action_object(
|
|||||||
LOG(ERROR) << "Receive " << to_string(action);
|
LOG(ERROR) << "Receive " << to_string(action);
|
||||||
return nullptr;
|
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<td_api::chatEventForumTopicToggleIsHidden>(
|
||||||
|
new_topic_info.get_forum_topic_info_object(td));
|
||||||
|
}
|
||||||
if (old_topic_info.is_closed() != new_topic_info.is_closed()) {
|
if (old_topic_info.is_closed() != new_topic_info.is_closed()) {
|
||||||
return td_api::make_object<td_api::chatEventForumTopicToggleIsClosed>(
|
return td_api::make_object<td_api::chatEventForumTopicToggleIsClosed>(
|
||||||
new_topic_info.get_forum_topic_info_object(td));
|
new_topic_info.get_forum_topic_info_object(td));
|
||||||
|
Loading…
Reference in New Issue
Block a user