Use still_unread_count from updates.
GitOrigin-RevId: e506aaef608895d9a925b4b90594b9a7978c4e07
This commit is contained in:
parent
078e48b56a
commit
34352e7f1f
@ -5183,7 +5183,8 @@ void MessagesManager::on_update_read_channel_inbox(tl_object_ptr<telegram_api::u
|
||||
folder_id = FolderId(update->folder_id_);
|
||||
}
|
||||
on_update_dialog_folder_id(dialog_id, folder_id);
|
||||
read_history_inbox(dialog_id, MessageId(ServerMessageId(update->max_id_)), -1, "updateReadChannelInbox");
|
||||
read_history_inbox(dialog_id, MessageId(ServerMessageId(update->max_id_)), update->still_unread_count_,
|
||||
"updateReadChannelInbox");
|
||||
}
|
||||
|
||||
void MessagesManager::on_update_read_channel_outbox(tl_object_ptr<telegram_api::updateReadChannelOutbox> &&update) {
|
||||
@ -5813,7 +5814,8 @@ void MessagesManager::process_update(tl_object_ptr<telegram_api::Update> &&updat
|
||||
folder_id = FolderId(read_update->folder_id_);
|
||||
}
|
||||
on_update_dialog_folder_id(dialog_id, folder_id);
|
||||
read_history_inbox(dialog_id, MessageId(ServerMessageId(read_update->max_id_)), -1, "updateReadHistoryInbox");
|
||||
read_history_inbox(dialog_id, MessageId(ServerMessageId(read_update->max_id_)), read_update->still_unread_count_,
|
||||
"updateReadHistoryInbox");
|
||||
break;
|
||||
}
|
||||
case telegram_api::updateReadHistoryOutbox::ID: {
|
||||
@ -8582,7 +8584,7 @@ void MessagesManager::read_history_inbox(DialogId dialog_id, MessageId max_messa
|
||||
|
||||
if (max_message_id != MessageId() && unread_count > 0 && max_message_id.get() >= d->last_new_message_id.get() &&
|
||||
max_message_id.get() >= d->last_message_id.get() && max_message_id.get() >= d->last_database_message_id.get()) {
|
||||
LOG(INFO) << "Have unknown " << unread_count << " unread messages in " << dialog_id;
|
||||
LOG(ERROR) << "Have unknown " << unread_count << " unread messages in " << dialog_id;
|
||||
unread_count = 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user