Connect all messages after last server message just in case.
GitOrigin-RevId: c99a8e50f49a37d1f34997b5de53129f34ec80d3
This commit is contained in:
parent
179117cfb8
commit
4d8c9a3a60
@ -7962,7 +7962,23 @@ void MessagesManager::on_get_history(DialogId dialog_id, MessageId from_message_
|
||||
if (need_update_dialog_pos) {
|
||||
send_update_chat_last_message(d, "on_get_gistory 2");
|
||||
}
|
||||
send_update_delete_messages(dialog_id, std::move(deleted_message_ids), true, false);
|
||||
|
||||
if (!deleted_message_ids.empty()) {
|
||||
send_update_delete_messages(dialog_id, std::move(deleted_message_ids), true, false);
|
||||
|
||||
message_ids.clear();
|
||||
find_newer_messages(d->messages.get(), last_server_message_id, message_ids);
|
||||
}
|
||||
|
||||
// connect all messages with ID > last_server_message_id
|
||||
for (size_t i = 0; i + 1 < message_ids.size(); i++) {
|
||||
auto m = get_message(d, message_ids[i]);
|
||||
CHECK(m != nullptr);
|
||||
if (!m->have_next) {
|
||||
m->have_next = true;
|
||||
attach_message_to_next(d, message_ids[i], "on_get_history 3");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user