fix(participants-pane): Don't show 'grant moderator' action if already moderator

This commit is contained in:
Vlad Piersec 2021-06-09 11:18:53 +03:00 committed by vp8x8
parent a564ce581d
commit db9b8784ac
2 changed files with 3 additions and 3 deletions

View File

@ -328,7 +328,7 @@ export function isLocalParticipantModerator(stateful: Object | Function) {
return false;
}
return localParticipant.role === PARTICIPANT_ROLE.MODERATOR;
return isParticipantModerator(localParticipant);
}
/**

View File

@ -13,7 +13,7 @@ import {
IconMuteEveryoneElse,
IconVideoOff
} from '../../base/icons';
import { isLocalParticipantModerator } from '../../base/participants';
import { isLocalParticipantModerator, isParticipantModerator } from '../../base/participants';
import { getIsParticipantVideoMuted } from '../../base/tracks';
import { openChat } from '../../chat/actions';
import { GrantModeratorDialog, KickRemoteParticipantDialog, MuteEveryoneDialog } from '../../video-menu';
@ -146,7 +146,7 @@ export const MeetingParticipantContextMenu = ({
))}
</ContextMenuItemGroup>
<ContextMenuItemGroup>
{isLocalModerator && (
{isLocalModerator && !isParticipantModerator(participant) && (
<ContextMenuItem onClick = { grantModerator }>
<ContextMenuIcon src = { IconCrown } />
<span>{t('toolbar.accessibilityLabel.grantModerator')}</span>