Add forum.is_hidden.
This commit is contained in:
parent
bc332ffa37
commit
8a0429c30f
@ -1327,6 +1327,7 @@ forumTopicInfo message_thread_id:int53 name:string icon:forumTopicIcon creation_
|
||||
//@info Basic information about the topic
|
||||
//@last_message Last message in the topic; may be null
|
||||
//@is_pinned True, if the topic is pinned in the topic list
|
||||
//@is_hidden True, if the topic is hidden above the topic list; for General topic only
|
||||
//@unread_count Number of unread messages in the topic
|
||||
//@last_read_inbox_message_id Identifier of the last read incoming message
|
||||
//@last_read_outbox_message_id Identifier of the last read outgoing message
|
||||
@ -1334,7 +1335,7 @@ forumTopicInfo message_thread_id:int53 name:string icon:forumTopicIcon creation_
|
||||
//@unread_reaction_count Number of messages with unread reactions in the topic
|
||||
//@notification_settings Notification settings for the topic
|
||||
//@draft_message A draft of a message in the topic; may be null
|
||||
forumTopic info:forumTopicInfo last_message:message is_pinned:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings draft_message:draftMessage = ForumTopic;
|
||||
forumTopic info:forumTopicInfo last_message:message is_pinned:Bool is_hidden:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings draft_message:draftMessage = ForumTopic;
|
||||
|
||||
|
||||
//@class RichText @description Describes a text object inside an instant-view web page
|
||||
|
@ -21,23 +21,25 @@ ForumTopic::ForumTopic(Td *td, tl_object_ptr<telegram_api::ForumTopic> &&forum_t
|
||||
LOG(INFO) << "Receive " << to_string(forum_topic_ptr);
|
||||
return;
|
||||
}
|
||||
|
||||
auto *forum_topic = static_cast<telegram_api::forumTopic *>(forum_topic_ptr.get());
|
||||
is_short_ = forum_topic->short_;
|
||||
is_pinned_ = forum_topic->pinned_;
|
||||
is_hidden_ = forum_topic->hidden_;
|
||||
notification_settings_ =
|
||||
get_dialog_notification_settings(std::move(forum_topic->notify_settings_), false, false, false, false);
|
||||
draft_message_ = get_draft_message(td->contacts_manager_.get(), std::move(forum_topic->draft_));
|
||||
|
||||
if (is_short_) {
|
||||
return;
|
||||
}
|
||||
|
||||
last_message_id_ = MessageId(ServerMessageId(forum_topic->top_message_));
|
||||
is_pinned_ = forum_topic->pinned_;
|
||||
is_hidden_ = forum_topic->hidden_;
|
||||
unread_count_ = forum_topic->unread_count_;
|
||||
last_read_inbox_message_id_ = MessageId(ServerMessageId(forum_topic->read_inbox_max_id_));
|
||||
last_read_outbox_message_id_ = MessageId(ServerMessageId(forum_topic->read_outbox_max_id_));
|
||||
unread_mention_count_ = forum_topic->unread_mentions_count_;
|
||||
unread_reaction_count_ = forum_topic->unread_reactions_count_;
|
||||
notification_settings_ =
|
||||
get_dialog_notification_settings(std::move(forum_topic->notify_settings_), false, false, false, false);
|
||||
draft_message_ = get_draft_message(td->contacts_manager_.get(), std::move(forum_topic->draft_));
|
||||
}
|
||||
|
||||
td_api::object_ptr<td_api::forumTopic> ForumTopic::get_forum_topic_object(Td *td, const ForumTopicInfo &info) const {
|
||||
@ -49,9 +51,9 @@ td_api::object_ptr<td_api::forumTopic> ForumTopic::get_forum_topic_object(Td *td
|
||||
// TODO last_message
|
||||
auto draft_message = get_draft_message_object(draft_message_);
|
||||
return td_api::make_object<td_api::forumTopic>(
|
||||
info.get_forum_topic_info_object(td), nullptr, is_pinned_, unread_count_, last_read_inbox_message_id_.get(),
|
||||
last_read_outbox_message_id_.get(), unread_mention_count_, unread_reaction_count_,
|
||||
get_chat_notification_settings_object(¬ification_settings_), std::move(draft_message));
|
||||
info.get_forum_topic_info_object(td), nullptr, is_pinned_, is_hidden_, unread_count_,
|
||||
last_read_inbox_message_id_.get(), last_read_outbox_message_id_.get(), unread_mention_count_,
|
||||
unread_reaction_count_, get_chat_notification_settings_object(¬ification_settings_), std::move(draft_message));
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
Loading…
Reference in New Issue
Block a user