소스 검색

fix(settings): use moderator check helper (#4292)

master
virtuacoplenny 6 년 전
부모
커밋
ded355a807
No account linked to committer's email address
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5
    4
      react/features/settings/functions.js

+ 5
- 4
react/features/settings/functions.js 파일 보기

@@ -2,7 +2,10 @@
2 2
 import { toState } from '../base/redux';
3 3
 import { parseStandardURIString } from '../base/util';
4 4
 import { i18next, DEFAULT_LANGUAGE, LANGUAGES } from '../base/i18n';
5
-import { getLocalParticipant, PARTICIPANT_ROLE } from '../base/participants';
5
+import {
6
+    getLocalParticipant,
7
+    isLocalParticipantModerator
8
+} from '../base/participants';
6 9
 
7 10
 declare var interfaceConfig: Object;
8 11
 
@@ -83,14 +86,12 @@ export function getMoreTabProps(stateful: Object | Function) {
83 86
     } = state['features/base/conference'];
84 87
     const followMeActive = Boolean(state['features/follow-me'].moderator);
85 88
     const configuredTabs = interfaceConfig.SETTINGS_SECTIONS || [];
86
-    const localParticipant = getLocalParticipant(state);
87
-
88 89
 
89 90
     // The settings sections to display.
90 91
     const showModeratorSettings = Boolean(
91 92
         conference
92 93
             && configuredTabs.includes('moderator')
93
-            && localParticipant.role === PARTICIPANT_ROLE.MODERATOR);
94
+            && isLocalParticipantModerator(state));
94 95
 
95 96
     return {
96 97
         currentLanguage: language,

Loading…
취소
저장