浏览代码

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

j8
virtuacoplenny 6 年前
父节点
当前提交
ded355a807
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5
    4
      react/features/settings/functions.js

+ 5
- 4
react/features/settings/functions.js 查看文件

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

正在加载...
取消
保存