Ensure that all messages after last_added_message_id are connected.

This commit is contained in:
levlam 2021-12-05 00:22:56 +03:00
parent 227fb48fbf
commit a116185e83

View File

@ -9220,6 +9220,11 @@ void MessagesManager::on_get_history(DialogId dialog_id, MessageId from_message_
}
}
if (from_the_end && last_added_message_id != last_received_message_id) {
CHECK(last_added_message_id < last_received_message_id);
delete_newer_server_messages_at_the_end(d, last_added_message_id);
}
if (have_full_history) {
d->have_full_history = true;
on_dialog_updated(dialog_id, "set have_full_history 2");