File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1188,6 +1188,14 @@ export class GroupCall extends TypedEventEmitter<
1188
1188
* Recalculates and updates the participant map to match the room state.
1189
1189
*/
1190
1190
private updateParticipants ( ) : void {
1191
+ const localMember = this . room . getMember ( this . client . getUserId ( ) ! ) ! ;
1192
+ if ( ! localMember ) {
1193
+ // The client hasn't fetched enough of the room state to get our own member
1194
+ // event. This probably shouldn't happen, but sanity check & exit for now.
1195
+ logger . warn ( "Tried to update participants before local room member is available" ) ;
1196
+ return ;
1197
+ }
1198
+
1191
1199
if ( this . participantsExpirationTimer !== null ) {
1192
1200
clearTimeout ( this . participantsExpirationTimer ) ;
1193
1201
this . participantsExpirationTimer = null ;
@@ -1242,7 +1250,6 @@ export class GroupCall extends TypedEventEmitter<
1242
1250
1243
1251
// Apply local echo for the entered case
1244
1252
if ( entered ) {
1245
- const localMember = this . room . getMember ( this . client . getUserId ( ) ! ) ! ;
1246
1253
let deviceMap = participants . get ( localMember ) ;
1247
1254
if ( deviceMap === undefined ) {
1248
1255
deviceMap = new Map ( ) ;
You can’t perform that action at this time.
0 commit comments