Fix invalid is_mutual_contact flag loaded from database.

GitOrigin-RevId: 87196eef3a6c7f78c642014fcef3fcf7e8609ebd
This commit is contained in:
levlam 2019-10-23 18:48:42 +03:00
parent 2036b828ac
commit 0b4b81282d

View File

@ -2884,9 +2884,15 @@ void ContactsManager::User::parse(ParserT &parser) {
if (has_cache_version) { if (has_cache_version) {
parse(cache_version, parser); parse(cache_version, parser);
} }
if (first_name.empty() && last_name.empty()) { if (first_name.empty() && last_name.empty()) {
first_name = phone_number; first_name = phone_number;
} }
if (!is_contact && is_mutual_contact) {
LOG(ERROR) << "Have invalid flag is_mutual_contact";
is_mutual_contact = false;
cache_version = 0;
}
} }
template <class StorerT> template <class StorerT>