Rename Google Cloud Messageing to Firebase Cloud Messaging.

GitOrigin-RevId: 56219b2225b6807f517afbc33f866f9b0c7e91c7
This commit is contained in:
levlam 2019-04-18 02:23:02 +03:00
parent 9715ae4462
commit e01d26eb2b
5 changed files with 8 additions and 8 deletions

View File

@ -1868,8 +1868,8 @@ localizationTargetInfo language_packs:vector<languagePackInfo> = LocalizationTar
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, you must specify the correct application platform and upload valid server authentication data at https://my.telegram.org
//@description A token for Google Cloud Messaging @token Device registration token; may be empty to de-register a device @encrypt True, if push notifications should be additionally encrypted
deviceTokenGoogleCloudMessaging token:string encrypt:Bool = DeviceToken;
//@description A token for Firebase Cloud Messaging @token Device registration token; may be empty to de-register a device @encrypt True, if push notifications should be additionally encrypted
deviceTokenFirebaseCloudMessaging token:string encrypt:Bool = DeviceToken;
//@description A token for Apple Push Notification service @device_token Device token; may be empty to de-register a device @is_app_sandbox True, if App Sandbox is enabled
deviceTokenApplePush device_token:string is_app_sandbox:Bool = DeviceToken;

Binary file not shown.

View File

@ -131,10 +131,10 @@ void DeviceTokenManager::register_device(tl_object_ptr<td_api::DeviceToken> devi
is_app_sandbox = device_token->is_app_sandbox_;
break;
}
case td_api::deviceTokenGoogleCloudMessaging::ID: {
auto device_token = static_cast<td_api::deviceTokenGoogleCloudMessaging *>(device_token_ptr.get());
case td_api::deviceTokenFirebaseCloudMessaging::ID: {
auto device_token = static_cast<td_api::deviceTokenFirebaseCloudMessaging *>(device_token_ptr.get());
token = std::move(device_token->token_);
token_type = TokenType::GCM;
token_type = TokenType::FCM;
encrypt = device_token->encrypt_;
break;
}

View File

@ -37,7 +37,7 @@ class DeviceTokenManager : public NetQueryCallback {
ActorShared<> parent_;
enum TokenType : int32 {
APNS = 1,
GCM = 2,
FCM = 2,
MPNS = 3,
SIMPLE_PUSH = 4,
UBUNTU_PHONE = 5,

View File

@ -1430,9 +1430,9 @@ class CliClient final : public Actor {
} else if (op == "rdb") {
send_request(td_api::make_object<td_api::registerDevice>(
td_api::make_object<td_api::deviceTokenBlackBerryPush>(args), as_user_ids("")));
} else if (op == "rdg") {
} else if (op == "rdf") {
send_request(td_api::make_object<td_api::registerDevice>(
td_api::make_object<td_api::deviceTokenGoogleCloudMessaging>(args, true), as_user_ids("")));
td_api::make_object<td_api::deviceTokenFirebaseCloudMessaging>(args, true), as_user_ids("")));
} else if (op == "rdt") {
string token;
string other_user_ids_str;