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(settings): use moderator check helper (#4292)

virtuacoplennyded355a80738
diff --git a/react/features/settings/functions.js b/react/features/settings/functions.js
index e0d0134f26..c906364e27 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,