From f899fe9145b4c63e7a62f5e5a97201c9936e1a77 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 13 Sep 2023 16:57:44 +0300 Subject: [PATCH] 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. --- td/telegram/MessagesManager.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 6ce0dfbbe..31e6f84f5 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -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);