Don't delete notifications when initializing last_new_message_id. There should be no old notifications anyway, but there could be a pending notification about the being added message.

This commit is contained in:
levlam 2023-09-13 16:57:44 +03:00
parent e65e5b0b49
commit f899fe9145

View File

@ -15039,7 +15039,6 @@ void MessagesManager::set_dialog_last_new_message_id(Dialog *d, MessageId last_n
<< last_new_message_id << " " << d->last_new_message_id << " " << source;
CHECK(d->dialog_id.get_type() == DialogType::SecretChat || last_new_message_id.is_server());
if (!d->last_new_message_id.is_valid()) {
delete_all_dialog_notifications(d, last_new_message_id, source);
remove_dialog_newer_messages(d, last_new_message_id, source);
auto last_new_message = get_message(d, last_new_message_id);