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 @@ -1182,6 +1182,14 @@ export class GroupCall extends TypedEventEmitter<
1182
1182
* Recalculates and updates the participant map to match the room state.
1183
1183
*/
1184
1184
private updateParticipants ( ) : void {
1185
+ const localMember = this . room . getMember ( this . client . getUserId ( ) ! ) ! ;
1186
+ if ( ! localMember ) {
1187
+ // The client hasn't fetched enough of the room state to get our own member
1188
+ // event. This probably shouldn't happen, but sanity check & exit for now.
1189
+ logger . warn ( "Tried to update participants before local room member is available" ) ;
1190
+ return ;
1191
+ }
1192
+
1185
1193
if ( this . participantsExpirationTimer !== null ) {
1186
1194
clearTimeout ( this . participantsExpirationTimer ) ;
1187
1195
this . participantsExpirationTimer = null ;
@@ -1236,7 +1244,6 @@ export class GroupCall extends TypedEventEmitter<
1236
1244
1237
1245
// Apply local echo for the entered case
1238
1246
if ( entered ) {
1239
- const localMember = this . room . getMember ( this . client . getUserId ( ) ! ) ! ;
1240
1247
let deviceMap = participants . get ( localMember ) ;
1241
1248
if ( deviceMap === undefined ) {
1242
1249
deviceMap = new Map ( ) ;
You can’t perform that action at this time.
0 commit comments