Fix saving changed user photo in UserFull to database.

GitOrigin-RevId: 0ee766994fe59c6493f92bfe2424b3868cbbb304
This commit is contained in:
levlam 2020-06-24 11:13:16 +03:00
parent 4acf82c506
commit e8ac30cbbf

View File

@ -8910,7 +8910,11 @@ void ContactsManager::on_get_user_full(tl_object_ptr<telegram_api::userFull> &&u
user->is_changed = true;
}
auto photo = get_photo(td_->file_manager_.get(), std::move(user_full->profile_photo_), DialogId());
if (photo != user->photo) {
user->photo = get_photo(td_->file_manager_.get(), std::move(user_full->profile_photo_), DialogId());
user->is_changed = true;
}
if (user->photo.is_empty()) {
drop_user_photos(user_id, true, false, "on_get_user_full");
} else {