diff --git a/src/webrtc/groupCall.ts b/src/webrtc/groupCall.ts index fa26eab840..e20d388a2b 100644 --- a/src/webrtc/groupCall.ts +++ b/src/webrtc/groupCall.ts @@ -794,6 +794,10 @@ export class GroupCall extends TypedEventEmitter< return; } + // Don't process your own member. + const localUserId = this.client.getUserId()!; + if (member.userId === localUserId) return; + logger.debug(`Processing member state event for ${member.userId}`); const ignore = () => { @@ -837,13 +841,6 @@ export class GroupCall extends TypedEventEmitter< this.removeParticipant(member); }, content["m.expires_ts"] - Date.now())); - // Don't process your own member. - const localUserId = this.client.getUserId()!; - - if (member.userId === localUserId) { - return; - } - // Only initiate a call with a user who has a userId that is lexicographically // less than your own. Otherwise, that user will call you. if (member.userId < localUserId) {