From c4230b432e1c004ae4131bbe5a0814812680c14f Mon Sep 17 00:00:00 2001 From: Robert Long Date: Mon, 26 Jul 2021 16:01:13 -0700 Subject: [PATCH] Dont get room until joined --- src/ConferenceCall.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ConferenceCall.js b/src/ConferenceCall.js index 0dfbcde..447e41e 100644 --- a/src/ConferenceCall.js +++ b/src/ConferenceCall.js @@ -10,7 +10,7 @@ export class ConferenceCall extends EventEmitter { this.client = client; this.roomId = roomId; this.joined = false; - this.room = client.getRoom(roomId); + this.room = null; this.localParticipant = { local: true, userId: client.getUserId(), @@ -33,6 +33,8 @@ export class ConferenceCall extends EventEmitter { this.joined = true; + this.room = this.client.getRoom(this.roomId); + const activeConf = this.room.currentState .getStateEvents(CONF_ROOM, "") ?.getContent()?.active;