diff --git a/src/event-engine/dispatcher.ts b/src/event-engine/dispatcher.ts index c948b3b29..40f61d684 100644 --- a/src/event-engine/dispatcher.ts +++ b/src/event-engine/dispatcher.ts @@ -77,7 +77,7 @@ export class EventEngineDispatcher extends Dispatcher { + asyncHandler(async (payload, _, { emitEvents }) => { if (payload.length > 0) { emitEvents(payload); } diff --git a/src/event-engine/presence/effects.ts b/src/event-engine/presence/effects.ts index b5317818f..e60579f5f 100644 --- a/src/event-engine/presence/effects.ts +++ b/src/event-engine/presence/effects.ts @@ -20,4 +20,6 @@ export const delayedHeartbeat = createManagedEffect( (context: HeartbeatReconnectingStateContext) => context, ); -export type Effects = MapOf; +export type Effects = MapOf< + typeof heartbeat | typeof leave | typeof emitStatus | typeof wait | typeof delayedHeartbeat +>; diff --git a/src/event-engine/presence/events.ts b/src/event-engine/presence/events.ts index 3e964c4af..d25642967 100644 --- a/src/event-engine/presence/events.ts +++ b/src/event-engine/presence/events.ts @@ -16,7 +16,7 @@ export const left = createEvent('LEFT', (channels: string[], groups: string[]) = export const leftAll = createEvent('LEFT_ALL', () => ({})); -export const heartbeatSuccess = createEvent('HEARTBEAT_SUCCESS', (statusCode: number) => ({ statusCode})); +export const heartbeatSuccess = createEvent('HEARTBEAT_SUCCESS', (statusCode: number) => ({ statusCode })); export const heartbeatFailure = createEvent('HEARTBEAT_FAILURE', (error: PubNubError) => error);