Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Vlad Piersecdb9b8784ac43
diff --git a/react/features/base/participants/functions.js b/react/features/base/participants/functions.js
index a5ade71543..4b361256c4 100644
--- a/react/features/base/participants/functions.js
+++ b/react/features/base/participants/functions.js
@@ -328,7 +328,7 @@ export function isLocalParticipantModerator(stateful: Object | Function) {
return false;
}
- return localParticipant.role === PARTICIPANT_ROLE.MODERATOR;
+ return isParticipantModerator(localParticipant);
}
/**
diff --git a/react/features/participants-pane/components/MeetingParticipantContextMenu.js b/react/features/participants-pane/components/MeetingParticipantContextMenu.js
index 814e1ae53a..6d8474003a 100644
--- a/react/features/participants-pane/components/MeetingParticipantContextMenu.js
+++ b/react/features/participants-pane/components/MeetingParticipantContextMenu.js
@@ -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>