fix(av-moderation) Fix Ask to Unmute

Make ask to unmute work even if the participant is already whitelisted for audio
This commit is contained in:
robertpin 2021-10-04 14:19:35 +03:00 committed by Дамян Минков
parent eba58ad56b
commit c6d3667211
1 changed files with 1 additions and 2 deletions

View File

@ -33,12 +33,11 @@ export const approveParticipant = (id: string) => (dispatch: Function, getState:
const { conference } = getConferenceState(state); const { conference } = getConferenceState(state);
const participant = getParticipantById(state, id); const participant = getParticipantById(state, id);
const isAudioForceMuted = isForceMuted(participant, MEDIA_TYPE.AUDIO, state);
const isVideoForceMuted = isForceMuted(participant, MEDIA_TYPE.VIDEO, state); const isVideoForceMuted = isForceMuted(participant, MEDIA_TYPE.VIDEO, state);
const isAudioModerationOn = isEnabledFromState(MEDIA_TYPE.AUDIO, state); const isAudioModerationOn = isEnabledFromState(MEDIA_TYPE.AUDIO, state);
const isVideoModerationOn = isEnabledFromState(MEDIA_TYPE.VIDEO, state); const isVideoModerationOn = isEnabledFromState(MEDIA_TYPE.VIDEO, state);
if (!(isAudioModerationOn || isVideoModerationOn) || (isAudioModerationOn && isAudioForceMuted)) { if (isAudioModerationOn || !isVideoModerationOn) {
conference.avModerationApprove(MEDIA_TYPE.AUDIO, id); conference.avModerationApprove(MEDIA_TYPE.AUDIO, id);
} }
if (isVideoModerationOn && isVideoForceMuted) { if (isVideoModerationOn && isVideoForceMuted) {