From 7af61c03afa54adcd9d70a73f1c7613b489d59a4 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 22 Feb 2022 22:54:00 +0300 Subject: [PATCH] Fix get_channel_difference_if_needed for searchCallMessages. --- td/telegram/MessagesManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 58782aef4..073eac68b 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -9737,6 +9737,9 @@ MessagesManager::MessagesInfo MessagesManager::get_messages_info( void MessagesManager::get_channel_difference_if_needed(DialogId dialog_id, MessagesInfo &&messages_info, Promise &&promise) { + if (!dialog_id.is_valid()) { + return get_channel_differences_if_needed(std::move(messages_info), std::move(promise)); + } for (auto &message : messages_info.messages) { if (need_channel_difference_to_add_message(dialog_id, message)) { return run_after_channel_difference(