Use public photo if full profile photo is unavailable.

This commit is contained in:
levlam 2022-12-30 00:21:16 +03:00
parent fbc493c361
commit c5ed576b1e

View File

@ -5016,7 +5016,8 @@ void Client::on_update(object_ptr<td_api::Object> result) {
auto update = move_object_as<td_api::updateUserFullInfo>(result);
auto user_id = update->user_id_;
auto full_info = update->user_full_info_.get();
set_user_photo(user_id, std::move(full_info->photo_));
set_user_photo(user_id,
full_info->photo_ == nullptr ? std::move(full_info->public_photo_) : std::move(full_info->photo_));
if (full_info->bio_ != nullptr) {
set_user_bio(user_id, std::move(full_info->bio_->text_));
}