Remove processDcUpdate in favor of processPushNotification.
GitOrigin-RevId: 7cc785061bd6915cdbf16be4f000992b9e720de0
This commit is contained in:
parent
e828ebc6d7
commit
8a5d186e34
@ -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
|
//@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<int32> = PushReceiverId;
|
registerDevice device_token:DeviceToken other_user_ids:vector<int32> = 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
|
//@description Handles a push notification. Can be called before authorization @payload JSON-encoded push notification payload
|
||||||
processPushNotification payload:string = Ok;
|
processPushNotification payload:string = Ok;
|
||||||
|
|
||||||
|
Binary file not shown.
@ -3187,7 +3187,6 @@ bool Td::is_preauthentication_request(int32 id) {
|
|||||||
case td_api::editCustomLanguagePackInfo::ID:
|
case td_api::editCustomLanguagePackInfo::ID:
|
||||||
case td_api::setCustomLanguagePackString::ID:
|
case td_api::setCustomLanguagePackString::ID:
|
||||||
case td_api::deleteLanguagePack::ID:
|
case td_api::deleteLanguagePack::ID:
|
||||||
case td_api::processDcUpdate::ID:
|
|
||||||
case td_api::processPushNotification::ID:
|
case td_api::processPushNotification::ID:
|
||||||
case td_api::getOption::ID:
|
case td_api::getOption::ID:
|
||||||
case td_api::setOption::ID:
|
case td_api::setOption::ID:
|
||||||
@ -4032,7 +4031,6 @@ Status Td::init(DbKey key) {
|
|||||||
|
|
||||||
complete_pending_preauthentication_requests([](int32 id) {
|
complete_pending_preauthentication_requests([](int32 id) {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case td_api::processDcUpdate::ID:
|
|
||||||
case td_api::processPushNotification::ID:
|
case td_api::processPushNotification::ID:
|
||||||
case td_api::setNetworkType::ID:
|
case td_api::setNetworkType::ID:
|
||||||
case td_api::getNetworkStatistics::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));
|
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<int32>(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) {
|
void Td::on_request(uint64 id, td_api::processPushNotification &request) {
|
||||||
CLEAN_INPUT_STRING(request.payload_);
|
CLEAN_INPUT_STRING(request.payload_);
|
||||||
CREATE_OK_REQUEST_PROMISE();
|
CREATE_OK_REQUEST_PROMISE();
|
||||||
|
@ -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::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::processPushNotification &request);
|
||||||
|
|
||||||
void on_request(uint64 id, td_api::registerDevice &request);
|
void on_request(uint64 id, td_api::registerDevice &request);
|
||||||
|
@ -1420,11 +1420,6 @@ class CliClient final : public Actor {
|
|||||||
} else if (op == "dpe") {
|
} else if (op == "dpe") {
|
||||||
string passport_element_type = args;
|
string passport_element_type = args;
|
||||||
send_request(td_api::make_object<td_api::deletePassportElement>(as_passport_element_type(passport_element_type)));
|
send_request(td_api::make_object<td_api::deletePassportElement>(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<td_api::processDcUpdate>(dc_id, ip_port));
|
|
||||||
} else if (op == "ppn") {
|
} else if (op == "ppn") {
|
||||||
send_request(td_api::make_object<td_api::processPushNotification>(args));
|
send_request(td_api::make_object<td_api::processPushNotification>(args));
|
||||||
} else if (op == "gpri") {
|
} else if (op == "gpri") {
|
||||||
|
Loading…
Reference in New Issue
Block a user