diff --git a/src/companion/platformClients.integration.test.ts b/src/companion/platformClients.integration.test.ts index 44ad063..cb393f0 100644 --- a/src/companion/platformClients.integration.test.ts +++ b/src/companion/platformClients.integration.test.ts @@ -31,6 +31,7 @@ const mockSession = { const mockSessionManager = { getSession: vi.fn(() => mockSession), + getSessionConfig: vi.fn(() => undefined), listSessions: vi.fn(() => ['ws:test']), transferSession: vi.fn(), closeSession: vi.fn(), diff --git a/src/companion/runtimeClient.test.ts b/src/companion/runtimeClient.test.ts index 68b9c47..9b1efd0 100644 --- a/src/companion/runtimeClient.test.ts +++ b/src/companion/runtimeClient.test.ts @@ -28,6 +28,7 @@ const mockSession = { const mockSessionManager = { getSession: vi.fn(() => mockSession), + getSessionConfig: vi.fn(() => undefined), listSessions: vi.fn(() => ['ws:test']), transferSession: vi.fn(), closeSession: vi.fn(), diff --git a/src/gateway/server.test.ts b/src/gateway/server.test.ts index e5c64e6..6eb6a46 100644 --- a/src/gateway/server.test.ts +++ b/src/gateway/server.test.ts @@ -31,6 +31,7 @@ const mockSession = { const mockSessionManager = { getSession: vi.fn(() => mockSession), + getSessionConfig: vi.fn(() => undefined), listSessions: vi.fn(() => ['ws:test']), transferSession: vi.fn(), closeSession: vi.fn(), diff --git a/src/gateway/server.ts b/src/gateway/server.ts index 4ae4a67..eb5d6cf 100644 --- a/src/gateway/server.ts +++ b/src/gateway/server.ts @@ -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, }); }, });