From 6dcc260f2aa417c70d3bc16ba0f9ac40ca69016d Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 26 Dec 2022 22:24:08 +0300 Subject: [PATCH] Ignore photo returned by DeleteContactProfilePhotoQuery. --- td/telegram/ContactsManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 09494207a..49a18433c 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -621,7 +621,9 @@ class DeleteContactProfilePhotoQuery final : public Td::ResultHandler { return on_error(result_ptr.move_as_error()); } - td_->contacts_manager_->on_set_profile_photo(user_id_, result_ptr.move_as_ok(), false, 0); + auto ptr = result_ptr.move_as_ok(); + ptr->photo_ = nullptr; + td_->contacts_manager_->on_set_profile_photo(user_id_, std::move(ptr), false, 0); promise_.set_value(Unit()); }