Skip to content

Commit

Permalink
Merge pull request #198 from SuperViz/feat/new-room-oackage-params
Browse files Browse the repository at this point in the history
feat: return the email in the transfromSocketMesssageToParticipant
  • Loading branch information
carlossantos74 authored Jan 6, 2025
2 parents dc7cdc6 + 74c5195 commit 6988236
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/room/src/core/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ describe('Room', () => {
{
id: '1',
name: 'Participant 1',
data: [],
data: {
email: null,
},
connectionId: 'conn-1',
timestamp: date,
},
Expand All @@ -232,6 +234,7 @@ describe('Room', () => {
expect(participants).toEqual([{
id: '1',
name: 'Participant 1',
email: null,
slot: {
index: null,
color: '#878291',
Expand Down
5 changes: 4 additions & 1 deletion packages/room/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down

0 comments on commit 6988236

Please sign in to comment.