diff --git a/react/features/toolbox/components/web/Toolbox.tsx b/react/features/toolbox/components/web/Toolbox.tsx index 6ec5a73db9b..84fa283cc2d 100644 --- a/react/features/toolbox/components/web/Toolbox.tsx +++ b/react/features/toolbox/components/web/Toolbox.tsx @@ -100,7 +100,7 @@ export default function Toolbox({ const jwt = useSelector((state: IReduxState) => state['features/base/jwt'].jwt); const localParticipant = useSelector(getLocalParticipant); const jwtDisabledButtons = useSelector((state: IReduxState) => - getJwtDisabledButtons(state, jwt, localParticipant?.features)); + getJwtDisabledButtons(state, isModerator, jwt, localParticipant?.features)); const reactionsButtonEnabled = useSelector(isReactionsButtonEnabled); const _shouldDisplayReactionsButtons = useSelector(shouldDisplayReactionsButtons); const toolbarVisible = useSelector(isToolboxVisible); diff --git a/react/features/toolbox/functions.any.ts b/react/features/toolbox/functions.any.ts index e6ef59856c0..8716d8dff16 100644 --- a/react/features/toolbox/functions.any.ts +++ b/react/features/toolbox/functions.any.ts @@ -21,12 +21,14 @@ export function isAudioMuteButtonDisabled(state: IReduxState) { * Returns the buttons corresponding to features disabled through jwt. * * @param {IReduxState} state - The state from the Redux store. + * @param {boolean} isModerator - Whether local participant is moderator. * @param {string | undefined} jwt - The jwt token. * @param {ILocalParticipant} localParticipantFeatures - The features of the local participant. * @returns {string[]} - The disabled by jwt buttons array. */ export function getJwtDisabledButtons( state: IReduxState, + isModerator: boolean, jwt: string | undefined, localParticipantFeatures?: IParticipantFeatures) { const acc = []; @@ -35,8 +37,8 @@ export function getJwtDisabledButtons( jwt, localParticipantFeatures, feature: 'livestreaming', - ifNoToken: true, - ifNotInFeatures: true + ifNoToken: isModerator, + ifNotInFeatures: isModerator })) { acc.push('livestreaming'); } @@ -45,8 +47,8 @@ export function getJwtDisabledButtons( jwt, localParticipantFeatures, feature: 'transcription', - ifNoToken: true, - ifNotInFeatures: true + ifNoToken: isModerator, + ifNotInFeatures: isModerator })) { acc.push('closedcaptions'); }