Add temporarily debug warning.

GitOrigin-RevId: aaa63a04daac08c75a0210a7055054c9251e150f
This commit is contained in:
levlam 2020-03-30 23:29:12 +03:00
parent 7932ea08eb
commit efd22eff7e
1 changed files with 5 additions and 1 deletions

View File

@ -8613,6 +8613,8 @@ void ContactsManager::on_get_user_photos(UserId user_id, int32 offset, int32 lim
return;
}
LOG(WARNING) << "Receive " << photo_count << " photos of " << user_id << " out of " << total_count << " with offset "
<< offset << " and limit " << limit;
UserPhotos *user_photos = &user_photos_[user_id];
user_photos->count = total_count;
CHECK(user_photos->getting_now);
@ -8633,9 +8635,11 @@ void ContactsManager::on_get_user_photos(UserId user_id, int32 offset, int32 lim
for (auto &photo : photos) {
auto user_photo = get_photo(td_->file_manager_.get(), std::move(photo), DialogId());
if (user_photo.id == -2) {
LOG(ERROR) << "Have got empty profile photo in getUserPhotos request for " << user_id << " with offset " << offset
LOG(ERROR) << "Receive empty profile photo in getUserPhotos request for " << user_id << " with offset " << offset
<< " and limit " << limit << ". Receive " << photo_count << " photos out of " << total_count
<< " photos";
user_photos->count--;
CHECK(user_photos->count >= 0);
continue;
}