From 181255baf2d232a0d7f552886d728cb6bff0db47 Mon Sep 17 00:00:00 2001 From: Carlos Santos Date: Sun, 2 Jun 2024 11:31:07 -0300 Subject: [PATCH] feat: send connectionId to clients into realtime message --- src/components/realtime/channel.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/realtime/channel.ts b/src/components/realtime/channel.ts index a60f88d7..07e05baf 100644 --- a/src/components/realtime/channel.ts +++ b/src/components/realtime/channel.ts @@ -136,6 +136,7 @@ export class Channel extends Observable { participantId: event?.presence?.id || null, name: event.data.name, timestamp: event.timestamp, + connectionId: event.connectionId, } as RealtimeMessage); }); } @@ -174,9 +175,9 @@ export class Channel extends Observable { data: event.data.payload, connectionId: event.connectionId, name: event.data.name, - participantId: event.presence.id, + participantId: event.presence?.id, timestamp: event.timestamp, - }); + } as RealtimeMessage); return group; },