-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runfix: conversation admin mutes a single call participant [WPB-5724] #16397
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev #16397 +/- ##
==========================================
+ Coverage 45.52% 45.57% +0.05%
==========================================
Files 732 732
Lines 23725 23746 +21
Branches 5398 5405 +7
==========================================
+ Hits 10800 10823 +23
+ Misses 11557 11549 -8
- Partials 1368 1374 +6 |
const isSenderAdmin = conversation.isAdmin(userId); | ||
if (!isSenderAdmin) { | ||
return; | ||
} | ||
|
||
const selfUserId = this.selfUser?.qualifiedId; | ||
const selfClientId = this.selfClientId; | ||
|
||
if (!selfUserId || !selfClientId) { | ||
return; | ||
} | ||
|
||
const isSelfClientTargetted = | ||
!!content.data.targets[selfUserId.domain]?.[selfUserId.id]?.includes(selfClientId); | ||
|
||
if (!isSelfClientTargetted) { | ||
return; | ||
} | ||
|
||
this.muteCall(call, true, MuteState.REMOTE_MUTED); | ||
return this.processCallingMessage(conversation, event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change - from now we verify whether a self client is included in targets
map and whether event creator is a conversation admin.
this.sendCallingMessage(conversationId, {type: CALL_MESSAGE_TYPE.REMOTE_MUTE}, {nativePush: true, recipients}); | ||
this.sendCallingMessage( | ||
conversationId, | ||
{type: CALL_MESSAGE_TYPE.REMOTE_MUTE, data: {targets: recipients}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When sending a REMOTEMUTE
type of calling message, we need to include targets
field containing the list of clients that should be muted.
Description
When muting other people in MLS conversation we need to provide a
targets
list in REMOTEMUTE type of calling event. A client that receives this event should verify whether it was meant to be muted and whether the event creator is a conversation admin.Checklist
Important details for the reviewers
(Delete this section if unnecessary)