diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 080a45c3a..96c01aad3 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3444,9 +3444,6 @@ deleteLanguagePack language_pack_id:string = Ok; //@description Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription @device_token Device token @other_user_ids List of at most 100 user identifiers of other users currently using the client registerDevice device_token:DeviceToken other_user_ids:vector = PushReceiverId; -//@description Handles a DC_UPDATE push notification. Can be called before authorization @dc Value of the "dc" parameter of the push notification @addr Value of the "addr" parameter of the push notification -processDcUpdate dc:string addr:string = Ok; - //@description Handles a push notification. Can be called before authorization @payload JSON-encoded push notification payload processPushNotification payload:string = Ok; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index f76fa13d4..36b44511f 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index e88f19e82..4058f2b69 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -3187,7 +3187,6 @@ bool Td::is_preauthentication_request(int32 id) { case td_api::editCustomLanguagePackInfo::ID: case td_api::setCustomLanguagePackString::ID: case td_api::deleteLanguagePack::ID: - case td_api::processDcUpdate::ID: case td_api::processPushNotification::ID: case td_api::getOption::ID: case td_api::setOption::ID: @@ -4032,7 +4031,6 @@ Status Td::init(DbKey key) { complete_pending_preauthentication_requests([](int32 id) { switch (id) { - case td_api::processDcUpdate::ID: case td_api::processPushNotification::ID: case td_api::setNetworkType::ID: case td_api::getNetworkStatistics::ID: @@ -4748,18 +4746,6 @@ void Td::on_request(uint64 id, td_api::createTemporaryPassword &request) { request.valid_for_, std::move(promise)); } -void Td::on_request(uint64 id, td_api::processDcUpdate &request) { - CLEAN_INPUT_STRING(request.dc_); - CLEAN_INPUT_STRING(request.addr_); - CREATE_OK_REQUEST_PROMISE(); - auto dc_id_raw = to_integer(request.dc_); - if (!DcId::is_valid(dc_id_raw)) { - return promise.set_error(Status::Error("Invalid dc id")); - } - send_closure(G()->connection_creator(), &ConnectionCreator::on_dc_update, DcId::internal(dc_id_raw), request.addr_, - std::move(promise)); -} - void Td::on_request(uint64 id, td_api::processPushNotification &request) { CLEAN_INPUT_STRING(request.payload_); CREATE_OK_REQUEST_PROMISE(); diff --git a/td/telegram/Td.h b/td/telegram/Td.h index 30e35c9c7..04da9d297 100644 --- a/td/telegram/Td.h +++ b/td/telegram/Td.h @@ -397,8 +397,6 @@ class Td final : public NetQueryCallback { void on_request(uint64 id, td_api::createTemporaryPassword &request); - void on_request(uint64 id, td_api::processDcUpdate &request); - void on_request(uint64 id, td_api::processPushNotification &request); void on_request(uint64 id, td_api::registerDevice &request); diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 5312631dc..5b16b016a 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1420,11 +1420,6 @@ class CliClient final : public Actor { } else if (op == "dpe") { string passport_element_type = args; send_request(td_api::make_object(as_passport_element_type(passport_element_type))); - } else if (op == "pdu" || op == "processDcUpdate") { - string dc_id; - string ip_port; - std::tie(dc_id, ip_port) = split(args); - send_request(td_api::make_object(dc_id, ip_port)); } else if (op == "ppn") { send_request(td_api::make_object(args)); } else if (op == "gpri") {