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());