Drop public message links from cache when dialog username changes.

GitOrigin-RevId: 008652cfb854f5298c7e9522fc086c78f1a66ecd
This commit is contained in:
levlam 2020-09-14 01:44:55 +03:00
parent e082b2ac49
commit d940b86113

View File

@ -27325,6 +27325,10 @@ void MessagesManager::on_dialog_username_updated(DialogId dialog_id, const strin
if (d != nullptr) {
update_dialogs_hints(d);
}
if (old_username != new_username) {
public_message_links_[0].erase(dialog_id);
public_message_links_[1].erase(dialog_id);
}
if (!old_username.empty() && old_username != new_username) {
resolved_usernames_.erase(clean_username(old_username));
inaccessible_resolved_usernames_.erase(clean_username(old_username));