Преглед изворни кода

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

j8
Vlad Piersec пре 4 година
родитељ
комит
db9b8784ac

+ 1
- 1
react/features/base/participants/functions.js Прегледај датотеку

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

+ 2
- 2
react/features/participants-pane/components/MeetingParticipantContextMenu.js Прегледај датотеку

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

Loading…
Откажи
Сачувај