Skip to content

Commit

Permalink
fix: Avoid remote mute message transmitting to other calls
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisamir98 committed Dec 4, 2024
1 parent 391f8ba commit 9bc1044
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/script/calling/CallingRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,12 @@ export class CallingRepository {
}

case CALL_MESSAGE_TYPE.REMOTE_MUTE: {
const call = this.findCall(conversationId);
if (!call) {
const currentCall = this.callState.joinedCall();
if (
!currentCall ||
!matchQualifiedIds(currentCall.conversation.qualifiedId, conversationId) ||
!this.selfUser
) {
return;
}

Expand All @@ -747,7 +751,7 @@ export class CallingRepository {
return;
}

this.muteCall(call, true, MuteState.REMOTE_MUTED);
this.muteCall(currentCall, true, MuteState.REMOTE_MUTED);
return this.processCallingMessage(conversation, event);
}

Expand Down

0 comments on commit 9bc1044

Please sign in to comment.