Update layer 116.

GitOrigin-RevId: 2daddadb7c75132729e8372a7edf40030696d038
This commit is contained in:
levlam 2020-07-20 00:38:44 +03:00
parent 01d768ff7e
commit 5b69e72b09
4 changed files with 11 additions and 7 deletions

View File

@ -1385,7 +1385,7 @@ updates.getState#edd4882a = updates.State;
updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
updates.getChannelDifference#3173d78 flags:# force:flags.0?true channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference;
photos.updateProfilePhoto#f0bb5152 id:InputPhoto = UserProfilePhoto;
photos.updateProfilePhoto#72d4742c id:InputPhoto = photos.Photo;
photos.uploadProfilePhoto#89f30f69 flags:# file:flags.0?InputFile video:flags.1?InputFile video_start_ts:flags.2?double = photos.Photo;
photos.deletePhotos#87cf7f2f id:Vector<InputPhoto> = Vector<long>;
photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;

Binary file not shown.

View File

@ -840,10 +840,7 @@ class UploadProfilePhotoQuery : public Td::ResultHandler {
return on_error(id, result_ptr.move_as_error());
}
auto ptr = result_ptr.move_as_ok();
LOG(INFO) << "Receive result for uploadProfilePhoto: " << to_string(ptr);
td->contacts_manager_->on_get_users(std::move(ptr->users_), "UploadProfilePhotoQuery");
// ignore ptr->photo_
td->contacts_manager_->on_change_profile_photo(result_ptr.move_as_ok());
td->file_manager_->delete_partial_remote_location(file_id_);
@ -879,8 +876,7 @@ class UpdateProfilePhotoQuery : public Td::ResultHandler {
return on_error(id, result_ptr.move_as_error());
}
LOG(DEBUG) << "Receive result for updateProfilePhoto " << to_string(result_ptr.ok());
td->contacts_manager_->on_update_user_photo(td->contacts_manager_->get_my_id(), result_ptr.move_as_ok());
td->contacts_manager_->on_change_profile_photo(result_ptr.move_as_ok());
promise_.set_value(Unit());
}
@ -10002,6 +9998,13 @@ void ContactsManager::on_ignored_restriction_reasons_changed() {
}
}
void ContactsManager::on_change_profile_photo(tl_object_ptr<telegram_api::photos_photo> &&photo) {
LOG(INFO) << "Changed profile photo to " << to_string(photo);
// ignore photo->photo_
on_get_users(std::move(photo->users_), "UploadProfilePhotoQuery");
}
void ContactsManager::on_delete_profile_photo(int64 profile_photo_id, Promise<Unit> promise) {
UserId my_id = get_my_id();

View File

@ -177,6 +177,7 @@ class ContactsManager : public Actor {
void on_update_user_common_chat_count(UserId user_id, int32 common_chat_count);
void on_update_user_need_phone_number_privacy_exception(UserId user_id, bool need_phone_number_privacy_exception);
void on_change_profile_photo(tl_object_ptr<telegram_api::photos_photo> &&photo);
void on_delete_profile_photo(int64 profile_photo_id, Promise<Unit> promise);
void on_ignored_restriction_reasons_changed();