Fix applying of updates about pinned forum topics.

This commit is contained in:
levlam 2023-07-22 21:53:32 +03:00
parent 7498aad742
commit ad5f37e99e

View File

@ -603,6 +603,9 @@ void ForumTopicManager::on_update_forum_topic_notify_settings(
void ForumTopicManager::on_update_forum_topic_is_pinned(DialogId dialog_id, MessageId top_thread_message_id,
bool is_pinned) {
if (!td_->messages_manager_->have_dialog_force(dialog_id, "on_update_forum_topic_is_pinned")) {
return;
}
if (!can_be_forum(dialog_id)) {
LOG(ERROR) << "Receive pinned topics in " << dialog_id;
return;
@ -623,6 +626,9 @@ void ForumTopicManager::on_update_forum_topic_is_pinned(DialogId dialog_id, Mess
}
void ForumTopicManager::on_update_pinned_forum_topics(DialogId dialog_id, vector<MessageId> top_thread_message_ids) {
if (!td_->messages_manager_->have_dialog_force(dialog_id, "on_update_pinned_forum_topics")) {
return;
}
if (!can_be_forum(dialog_id)) {
LOG(ERROR) << "Receive pinned topics in " << dialog_id;
return;