Fix processing of inaccessible users.

GitOrigin-RevId: dea00d3a71e4f85b44c73c6620c2edaf39bddf17
This commit is contained in:
levlam 2019-06-17 04:36:27 +03:00
parent 11e9923e0a
commit 9ee52310fb

View File

@ -5104,6 +5104,12 @@ void ContactsManager::on_get_user(tl_object_ptr<telegram_api::User> &&user_ptr,
bool have_access_hash = (flags & USER_FLAG_HAS_ACCESS_HASH) != 0;
bool is_received = (flags & USER_FLAG_IS_INACCESSIBLE) == 0;
if (!is_received && !have_user_force(user_id)) {
// we must preload information about received inaccessible users from database in order to not save
// the min-user to the database and to not override access_hash and another info
LOG(INFO) << "Receive inaccessible " << user_id;
}
User *u = add_user(user_id, "on_get_user");
if (have_access_hash) { // access_hash must be updated before photo
auto access_hash = user->access_hash_;