Change outbound link to KnowsPhoneNumber if have phone number.

GitOrigin-RevId: 25e1efef971fe168155f54ed899288ac9b1020e5
This commit is contained in:
levlam 2019-06-27 19:33:46 +03:00
parent dda4c4fc7d
commit bec71af259

View File

@ -7259,6 +7259,9 @@ void ContactsManager::on_update_user_links(User *u, UserId user_id, LinkState ou
}
inbound = outbound;
}
if (!u->phone_number.empty() && outbound == LinkState::None) {
outbound = LinkState::KnowsPhoneNumber;
}
LOG(DEBUG) << "Update " << user_id << " links from (" << u->outbound << ", " << u->inbound << ") to (" << outbound
<< ", " << inbound << ")";