From ded355a8073804ef0f08b83a6d0be83fc1661ec5 Mon Sep 17 00:00:00 2001 From: virtuacoplenny Date: Thu, 30 May 2019 14:10:40 -0700 Subject: [PATCH] fix(settings): use moderator check helper (#4292) --- react/features/settings/functions.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/react/features/settings/functions.js b/react/features/settings/functions.js index e0d0134f2..c906364e2 100644 --- a/react/features/settings/functions.js +++ b/react/features/settings/functions.js @@ -2,7 +2,10 @@ import { toState } from '../base/redux'; import { parseStandardURIString } from '../base/util'; import { i18next, DEFAULT_LANGUAGE, LANGUAGES } from '../base/i18n'; -import { getLocalParticipant, PARTICIPANT_ROLE } from '../base/participants'; +import { + getLocalParticipant, + isLocalParticipantModerator +} from '../base/participants'; declare var interfaceConfig: Object; @@ -83,14 +86,12 @@ export function getMoreTabProps(stateful: Object | Function) { } = state['features/base/conference']; const followMeActive = Boolean(state['features/follow-me'].moderator); const configuredTabs = interfaceConfig.SETTINGS_SECTIONS || []; - const localParticipant = getLocalParticipant(state); - // The settings sections to display. const showModeratorSettings = Boolean( conference && configuredTabs.includes('moderator') - && localParticipant.role === PARTICIPANT_ROLE.MODERATOR); + && isLocalParticipantModerator(state)); return { currentLanguage: language,