From bec71af259eb6c5da1c8106a749c6ec867ca9092 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 27 Jun 2019 19:33:46 +0300 Subject: [PATCH] Change outbound link to KnowsPhoneNumber if have phone number. GitOrigin-RevId: 25e1efef971fe168155f54ed899288ac9b1020e5 --- td/telegram/ContactsManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 98ef329e4..257bacaf3 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -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 << ")";