Add Android node foundation with FCM push support
This commit is contained in:
@@ -46,7 +46,7 @@ export interface NodeStatusSetParams {
|
||||
|
||||
export interface NodePushTokenSetParams {
|
||||
connectionId: string;
|
||||
provider: 'apns';
|
||||
provider: 'apns' | 'fcm';
|
||||
token: string;
|
||||
topic?: string;
|
||||
environment?: 'sandbox' | 'production';
|
||||
@@ -309,7 +309,7 @@ export function parseNodePushTokenSetParams(params: unknown): NodePushTokenSetPa
|
||||
if (typeof p.connectionId !== 'string' || !p.connectionId.trim()) {
|
||||
return null;
|
||||
}
|
||||
if (p.provider !== 'apns') {
|
||||
if (p.provider !== 'apns' && p.provider !== 'fcm') {
|
||||
return null;
|
||||
}
|
||||
if (typeof p.token !== 'string' || p.token.trim().length < 16) {
|
||||
@@ -324,7 +324,7 @@ export function parseNodePushTokenSetParams(params: unknown): NodePushTokenSetPa
|
||||
|
||||
return {
|
||||
connectionId: p.connectionId,
|
||||
provider: 'apns',
|
||||
provider: p.provider,
|
||||
token: p.token.trim(),
|
||||
topic: typeof p.topic === 'string' ? p.topic.trim() : undefined,
|
||||
environment: p.environment as NodePushTokenSetParams['environment'] | undefined,
|
||||
|
||||
Reference in New Issue
Block a user