diff --git a/packages/room/src/core/index.test.ts b/packages/room/src/core/index.test.ts index aaa7f1e2..44e10923 100644 --- a/packages/room/src/core/index.test.ts +++ b/packages/room/src/core/index.test.ts @@ -220,7 +220,9 @@ describe('Room', () => { { id: '1', name: 'Participant 1', - data: [], + data: { + email: null, + }, connectionId: 'conn-1', timestamp: date, }, @@ -232,6 +234,7 @@ describe('Room', () => { expect(participants).toEqual([{ id: '1', name: 'Participant 1', + email: null, slot: { index: null, color: '#878291', diff --git a/packages/room/src/core/index.ts b/packages/room/src/core/index.ts index 53125ad6..9501aeb7 100644 --- a/packages/room/src/core/index.ts +++ b/packages/room/src/core/index.ts @@ -157,6 +157,7 @@ export class Room { id: message.id, name: participant?.name ? participant.name : message.name, activeComponents: participant?.activeComponents ?? [], + email: participant?.email ?? null, slot: participant?.slot ?? { index: null, color: '#878291', @@ -175,7 +176,9 @@ export class Room { */ private createParticipant(initialData: InitialParticipant): Participant { return { - ...initialData, + id: initialData.id, + name: initialData.name, + email: initialData.email ?? null, activeComponents: [], slot: { index: null,