Add td_api::deviceTokenHuaweiPush.
This commit is contained in:
parent
9555bfc16c
commit
784b46a298
@ -3914,6 +3914,9 @@ deviceTokenBlackBerryPush token:string = DeviceToken;
|
||||
//@description A token for Tizen Push Service @reg_id Push service registration identifier; may be empty to deregister a device
|
||||
deviceTokenTizenPush reg_id:string = DeviceToken;
|
||||
|
||||
//@description A token for HUAWEI Push Service @token Device registration token; may be empty to deregister a device @encrypt True, if push notifications must be additionally encrypted
|
||||
deviceTokenHuaweiPush token:string encrypt:Bool = DeviceToken;
|
||||
|
||||
|
||||
//@description Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification @id The globally unique identifier of push notification subscription
|
||||
pushReceiverId id:int64 = PushReceiverId;
|
||||
|
@ -231,6 +231,13 @@ void DeviceTokenManager::register_device(tl_object_ptr<td_api::DeviceToken> devi
|
||||
token_type = TokenType::Tizen;
|
||||
break;
|
||||
}
|
||||
case td_api::deviceTokenHuaweiPush::ID: {
|
||||
auto device_token = static_cast<td_api::deviceTokenHuaweiPush *>(device_token_ptr.get());
|
||||
token = std::move(device_token->token_);
|
||||
token_type = TokenType::Huawei;
|
||||
encrypt = device_token->encrypt_;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ class DeviceTokenManager final : public NetQueryCallback {
|
||||
WebPush = 10,
|
||||
MpnsVoip = 11,
|
||||
Tizen = 12,
|
||||
Huawei = 13,
|
||||
Size
|
||||
};
|
||||
struct TokenInfo {
|
||||
|
Loading…
x
Reference in New Issue
Block a user