From d0939b52d9388781950902d78a56a1a780386032 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Mon, 9 Dec 2024 19:02:11 +0100 Subject: [PATCH] Keep backwards compatibility for attributes updates on creation --- src/room/Room.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/room/Room.ts b/src/room/Room.ts index 77cf22f972..5b1db655f2 100644 --- a/src/room/Room.ts +++ b/src/room/Room.ts @@ -1862,6 +1862,11 @@ class Room extends (EventEmitter as new () => TypedEmitter) 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; }