fix(gateway): align session mocks and persist normalized push provider
This commit is contained in:
@@ -430,9 +430,17 @@ export class GatewayServer {
|
||||
if (!existing) {
|
||||
return;
|
||||
}
|
||||
const provider = pushToken.provider === 'fcm' ? 'fcm' : 'apns';
|
||||
const normalizedPushToken = {
|
||||
provider,
|
||||
token: pushToken.token,
|
||||
topic: pushToken.topic,
|
||||
environment: provider === 'apns' ? pushToken.environment : undefined,
|
||||
registeredAt: pushToken.registeredAt,
|
||||
};
|
||||
this.connectionStateMap.set(connectionId, {
|
||||
...existing,
|
||||
pushToken,
|
||||
pushToken: normalizedPushToken,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user