Fix updating user links.
GitOrigin-RevId: 9c4098524f6f3f817bae9d4eb33b244282dd378e
This commit is contained in:
parent
134785fc3d
commit
68cc159a54
@ -5111,23 +5111,23 @@ void ContactsManager::on_get_user(tl_object_ptr<telegram_api::User> &&user_ptr,
|
|||||||
on_update_user_photo(u, user_id, std::move(user->photo_));
|
on_update_user_photo(u, user_id, std::move(user->photo_));
|
||||||
if (is_received) {
|
if (is_received) {
|
||||||
on_update_user_online(u, user_id, std::move(user->status_));
|
on_update_user_online(u, user_id, std::move(user->status_));
|
||||||
}
|
|
||||||
|
|
||||||
LinkState out, in;
|
LinkState out, in;
|
||||||
if (flags & USER_FLAG_IS_MUTUAL_CONTACT) {
|
if (flags & USER_FLAG_IS_MUTUAL_CONTACT) {
|
||||||
out = LinkState::Contact;
|
out = LinkState::Contact;
|
||||||
in = LinkState::Contact;
|
in = LinkState::Contact;
|
||||||
} else if (flags & USER_FLAG_IS_CONTACT) {
|
} else if (flags & USER_FLAG_IS_CONTACT) {
|
||||||
out = LinkState::Contact;
|
out = LinkState::Contact;
|
||||||
in = LinkState::Unknown;
|
in = LinkState::Unknown;
|
||||||
} else if (flags & USER_FLAG_HAS_PHONE_NUMBER) {
|
} else if (flags & USER_FLAG_HAS_PHONE_NUMBER) {
|
||||||
out = LinkState::KnowsPhoneNumber;
|
out = LinkState::KnowsPhoneNumber;
|
||||||
in = LinkState::Unknown;
|
in = LinkState::Unknown;
|
||||||
} else {
|
} else {
|
||||||
out = LinkState::None;
|
out = LinkState::None;
|
||||||
in = LinkState::Unknown;
|
in = LinkState::Unknown;
|
||||||
|
}
|
||||||
|
on_update_user_links(u, user_id, out, in);
|
||||||
}
|
}
|
||||||
on_update_user_links(u, user_id, out, in);
|
|
||||||
|
|
||||||
if (is_received || !u->is_received) {
|
if (is_received || !u->is_received) {
|
||||||
on_update_user_name(u, user_id, std::move(user->first_name_), std::move(user->last_name_),
|
on_update_user_name(u, user_id, std::move(user->first_name_), std::move(user->last_name_),
|
||||||
|
Reference in New Issue
Block a user