From 2cd73ca028ac6d5dd7e2bd5b64bf1b94d60c23ea Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 8 Apr 2020 00:54:41 +0300 Subject: [PATCH] Skip empty contacts.deleteByPhones request. GitOrigin-RevId: e9a2f30b9d2d149bcb699604e2fdb836e17c83ce --- td/telegram/ContactsManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index ecef14a1..676da242 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -698,6 +698,9 @@ class DeleteContactsByPhoneNumberQuery : public Td::ResultHandler { } void send(vector &&user_phone_numbers, vector &&user_ids) { + if (user_phone_numbers.empty()) { + return promise_.set_value(Unit()); + } user_ids_ = std::move(user_ids); send_query(G()->net_query_creator().create(telegram_api::contacts_deleteByPhones(std::move(user_phone_numbers)))); }