Don't reload chat active stories if have no read access to the chat.
This commit is contained in:
parent
1b8cb6a31f
commit
73bd67d88d
@ -11975,7 +11975,7 @@ void ContactsManager::update_user(User *u, UserId user_id, bool from_binlog, boo
|
||||
u->is_is_contact_changed = false;
|
||||
}
|
||||
if (u->is_is_mutual_contact_changed) {
|
||||
if (!from_database) {
|
||||
if (!from_database && u->is_update_user_sent) {
|
||||
send_closure_later(td_->story_manager_actor_, &StoryManager::reload_dialog_expiring_stories, DialogId(user_id));
|
||||
}
|
||||
u->is_is_mutual_contact_changed = false;
|
||||
|
@ -2044,7 +2044,10 @@ void StoryManager::get_dialog_expiring_stories(DialogId owner_dialog_id,
|
||||
}
|
||||
|
||||
void StoryManager::reload_dialog_expiring_stories(DialogId dialog_id) {
|
||||
td_->messages_manager_->force_create_dialog(dialog_id, "reload_dialog_expiring_stories", true);
|
||||
if (!td_->messages_manager_->have_input_peer(dialog_id, AccessRights::Read)) {
|
||||
return;
|
||||
}
|
||||
td_->messages_manager_->force_create_dialog(dialog_id, "reload_dialog_expiring_stories");
|
||||
load_dialog_expiring_stories(dialog_id, 0, "reload_dialog_expiring_stories");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user