From 525f72263da4ca372fbbe35bf07ae1e4f2bb3626 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 8 Apr 2021 02:19:14 +0300 Subject: [PATCH] Delete old messages using set_dialog_max_unavailable_message_id when receive MessageChatDeleteHistory. --- td/telegram/MessagesManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 1eeb632bc..15be2b4a4 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -32118,6 +32118,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq } LOG(INFO) << "Process MessageChatDeleteHistory in " << message_id << " in " << dialog_id << " with date " << message->date << " from " << source; + set_dialog_max_unavailable_message_id(dialog_id, message_id, false, "message chat delete history"); CHECK(!message->from_database); debug_add_message_to_dialog_fail_reason_ = "skip adding MessageChatDeleteHistory"; return nullptr;