Fix ChannelFull dependencies.

This commit is contained in:
levlam 2021-08-11 16:52:34 +03:00
parent 394e3450de
commit 45790b144c

View File

@ -9535,7 +9535,9 @@ void ContactsManager::on_load_channel_full_from_database(ChannelId channel_id, s
Dependencies dependencies; Dependencies dependencies;
dependencies.channel_ids.insert(channel_id); 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.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->bot_user_ids.begin(), channel_full->bot_user_ids.end());
dependencies.user_ids.insert(channel_full->invite_link.get_creator_user_id()); dependencies.user_ids.insert(channel_full->invite_link.get_creator_user_id());