From 45790b144cf5c6fc95937c692f7711b57ec30054 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 11 Aug 2021 16:52:34 +0300 Subject: [PATCH] Fix ChannelFull dependencies. --- td/telegram/ContactsManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 7fb90cd96..cab0b7bf2 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -9535,7 +9535,9 @@ void ContactsManager::on_load_channel_full_from_database(ChannelId channel_id, s Dependencies dependencies; dependencies.channel_ids.insert(channel_id); - add_dialog_and_dependencies(dependencies, DialogId(channel_full->linked_channel_id)); + // must not depend on the linked_dialog_id itself, because message database can be disabled + // the Dialog will be forcely created in update_channel_full + add_dialog_dependencies(dependencies, DialogId(channel_full->linked_channel_id)); dependencies.chat_ids.insert(channel_full->migrated_from_chat_id); dependencies.user_ids.insert(channel_full->bot_user_ids.begin(), channel_full->bot_user_ids.end()); dependencies.user_ids.insert(channel_full->invite_link.get_creator_user_id());