Skip to content

Commit

Permalink
Keep backwards compatibility for attributes updates on creation
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO committed Dec 9, 2024
1 parent 5ecc1d9 commit d0939b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/room/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,11 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
if (info) {
participant.updateInfo(info);
}
// in order to keep backwards compatibility, manually trigger a attributes changed event after creating the participant
if (Object.keys(info.attributes).length > 0) {
participant.emit(ParticipantEvent.AttributesChanged, info.attributes);
}

return participant;
}

Expand Down

0 comments on commit d0939b5

Please sign in to comment.