Use get_next_message_id.

This commit is contained in:
levlam 2022-11-16 23:55:45 +03:00
parent 2e6ac1f22c
commit 66032b4ccf

View File

@ -35648,7 +35648,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
// then definitely there are no unread incoming messages before it
if (message_id.is_server() && d->last_read_inbox_message_id.is_valid() &&
d->last_read_inbox_message_id.is_server() &&
message_id.get_server_message_id().get() == d->last_read_inbox_message_id.get_server_message_id().get() + 1) {
message_id == d->last_read_inbox_message_id.get_next_message_id(MessageType::Server)) {
read_history_inbox(dialog_id, message_id, 0, "add_message_to_dialog");
}
}