Reload chat active stories when is_mutual_contact changes.
This commit is contained in:
parent
32f6026278
commit
ad8d977a03
@ -11956,6 +11956,9 @@ void ContactsManager::update_user(User *u, UserId user_id, bool from_binlog, boo
|
||||
td_->messages_manager_->on_dialog_user_is_contact_updated(DialogId(user_id), u->is_contact);
|
||||
send_closure_later(td_->story_manager_actor_, &StoryManager::on_dialog_active_stories_order_updated,
|
||||
DialogId(user_id), "is_contact");
|
||||
if (!from_database && u->is_is_mutual_contact_changed) {
|
||||
send_closure_later(td_->story_manager_actor_, &StoryManager::reload_dialog_expiring_stories, DialogId(user_id));
|
||||
}
|
||||
if (is_user_contact(u, user_id, false)) {
|
||||
auto user_full = get_user_full(user_id);
|
||||
if (user_full != nullptr && user_full->need_phone_number_privacy_exception) {
|
||||
@ -11964,6 +11967,7 @@ void ContactsManager::update_user(User *u, UserId user_id, bool from_binlog, boo
|
||||
}
|
||||
}
|
||||
u->is_is_contact_changed = false;
|
||||
u->is_is_mutual_contact_changed = false;
|
||||
}
|
||||
if (u->is_is_deleted_changed) {
|
||||
td_->messages_manager_->on_dialog_user_is_deleted_updated(DialogId(user_id), u->is_deleted);
|
||||
@ -13693,6 +13697,9 @@ void ContactsManager::on_update_user_is_contact(User *u, UserId user_id, bool is
|
||||
<< ")";
|
||||
if (u->is_contact != is_contact) {
|
||||
u->is_is_contact_changed = true;
|
||||
if (u->is_mutual_contact != is_mutual_contact) {
|
||||
u->is_is_mutual_contact_changed = true;
|
||||
}
|
||||
}
|
||||
u->is_contact = is_contact;
|
||||
u->is_mutual_contact = is_mutual_contact;
|
||||
|
@ -809,6 +809,7 @@ class ContactsManager final : public Actor {
|
||||
bool is_phone_number_changed = true;
|
||||
bool is_emoji_status_changed = true;
|
||||
bool is_is_contact_changed = true;
|
||||
bool is_is_mutual_contact_changed = true;
|
||||
bool is_is_deleted_changed = true;
|
||||
bool is_is_premium_changed = true;
|
||||
bool is_stories_hidden_changed = true;
|
||||
|
Loading…
Reference in New Issue
Block a user