diff --git a/react/features/base/jwt/functions.ts b/react/features/base/jwt/functions.ts index f5fa1107c43..64b3d70cb6d 100644 --- a/react/features/base/jwt/functions.ts +++ b/react/features/base/jwt/functions.ts @@ -92,7 +92,7 @@ export function isJwtFeatureEnabledStateless({ } if (typeof features === 'undefined') { - return ifNotInFeatures; + return ifNoToken; } if (typeof features[feature as keyof typeof features] === 'undefined') { diff --git a/react/features/invite/functions.ts b/react/features/invite/functions.ts index c1f5c32dd57..ce43974370f 100644 --- a/react/features/invite/functions.ts +++ b/react/features/invite/functions.ts @@ -493,7 +493,7 @@ export function isDialOutEnabled(state: IReduxState): boolean { const { conference } = state['features/base/conference']; const isModerator = isLocalParticipantModerator(state); - return isJwtFeatureEnabled(state, 'outbound-call', isModerator, isModerator) + return isJwtFeatureEnabled(state, 'outbound-call', isModerator, false) && conference && conference.isSIPCallingSupported(); } @@ -507,7 +507,7 @@ export function isSipInviteEnabled(state: IReduxState): boolean { const { sipInviteUrl } = state['features/base/config']; const isModerator = isLocalParticipantModerator(state); - return isJwtFeatureEnabled(state, 'sip-outbound-call', isModerator, isModerator) + return isJwtFeatureEnabled(state, 'sip-outbound-call', isModerator, false) && Boolean(sipInviteUrl); } diff --git a/react/features/recording/actions.any.ts b/react/features/recording/actions.any.ts index ae786e0de2f..4ff032664ac 100644 --- a/react/features/recording/actions.any.ts +++ b/react/features/recording/actions.any.ts @@ -435,7 +435,7 @@ export function showStartRecordingNotificationWithCallback(openRecordingDialog: const isModerator = isLocalParticipantModerator(state); const { recordingService } = state['features/base/config']; const canBypassDialog = recordingService?.enabled - && isJwtFeatureEnabled(state, 'recording', isModerator, isModerator); + && isJwtFeatureEnabled(state, 'recording', isModerator, false); if (canBypassDialog) { const options = { diff --git a/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts b/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts index 2a49c74030c..9219689c031 100644 --- a/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts +++ b/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts @@ -133,7 +133,7 @@ export function _mapStateToProps(state: IReduxState, ownProps: IProps) { const liveStreaming = getLiveStreaming(state); visible = isLiveStreamingButtonVisible({ - liveStreamingAllowed: isJwtFeatureEnabled(state, 'livestreaming', isModerator, isModerator), + liveStreamingAllowed: isJwtFeatureEnabled(state, 'livestreaming', isModerator, false), liveStreamingEnabled: liveStreaming?.enabled, isInBreakoutRoom: isInBreakoutRoom(state) }); diff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx index e17fec52415..3400002650d 100644 --- a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx +++ b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx @@ -421,7 +421,7 @@ export function mapStateToProps(state: IReduxState) { isVpaas: isVpaasMeeting(state), _canStartTranscribing: canAddTranscriber(state), _hideStorageWarning: Boolean(recordingService?.hideStorageWarning), - _renderRecording: isJwtFeatureEnabled(state, 'recording', isModerator, isModerator), + _renderRecording: isJwtFeatureEnabled(state, 'recording', isModerator, false), _localRecordingAvailable, _localRecordingEnabled: !localRecording?.disable, _localRecordingSelfEnabled: !localRecording?.disableSelfRecording, diff --git a/react/features/recording/functions.ts b/react/features/recording/functions.ts index aae28195ab7..03a36ed37fc 100644 --- a/react/features/recording/functions.ts +++ b/react/features/recording/functions.ts @@ -205,7 +205,7 @@ export function canStopRecording(state: IReduxState) { if (isCloudRecordingRunning(state) || isRecorderTranscriptionsRunning(state)) { const isModerator = isLocalParticipantModerator(state); - return isJwtFeatureEnabled(state, 'recording', isModerator, isModerator); + return isJwtFeatureEnabled(state, 'recording', isModerator, false); } return false; @@ -269,7 +269,7 @@ export function getRecordButtonProps(state: IReduxState) { if (localRecordingEnabled) { visible = true; - } else if (isJwtFeatureEnabled(state, 'recording', isModerator, isModerator)) { + } else if (isJwtFeatureEnabled(state, 'recording', isModerator, false)) { visible = recordingEnabled; } diff --git a/react/features/recording/hooks.web.ts b/react/features/recording/hooks.web.ts index 2a831611400..adbd5278096 100644 --- a/react/features/recording/hooks.web.ts +++ b/react/features/recording/hooks.web.ts @@ -48,7 +48,7 @@ export function useLiveStreamingButton() { const localParticipantIsModerator = useSelector(isLocalParticipantModerator); const liveStreaming = useSelector(getLiveStreaming); const liveStreamingAllowed = useSelector((state: IReduxState) => - isJwtFeatureEnabled(state, 'livestreaming', localParticipantIsModerator, localParticipantIsModerator)); + isJwtFeatureEnabled(state, 'livestreaming', localParticipantIsModerator, false)); const _isInBreakoutRoom = useSelector(isInBreakoutRoom); if (toolbarButtons?.includes('recording') diff --git a/react/features/subtitles/middleware.ts b/react/features/subtitles/middleware.ts index 16d3795bfc7..587bc95cdfe 100644 --- a/react/features/subtitles/middleware.ts +++ b/react/features/subtitles/middleware.ts @@ -251,7 +251,7 @@ function _requestingSubtitlesChange( if (enabled && conference?.getTranscriptionStatus() === JitsiMeetJS.constants.transcriptionStatus.OFF) { const isModerator = isLocalParticipantModerator(state); - const featureAllowed = isJwtFeatureEnabled(getState(), 'transcription', isModerator, isModerator); + const featureAllowed = isJwtFeatureEnabled(getState(), 'transcription', isModerator, false); if (featureAllowed) { conference?.dial(TRANSCRIBER_DIAL_NUMBER) diff --git a/react/features/toolbox/functions.any.ts b/react/features/toolbox/functions.any.ts index 8716d8dff16..38c8ac9d1e8 100644 --- a/react/features/toolbox/functions.any.ts +++ b/react/features/toolbox/functions.any.ts @@ -38,7 +38,7 @@ export function getJwtDisabledButtons( localParticipantFeatures, feature: 'livestreaming', ifNoToken: isModerator, - ifNotInFeatures: isModerator + ifNotInFeatures: false })) { acc.push('livestreaming'); } @@ -48,7 +48,7 @@ export function getJwtDisabledButtons( localParticipantFeatures, feature: 'transcription', ifNoToken: isModerator, - ifNotInFeatures: isModerator + ifNotInFeatures: false })) { acc.push('closedcaptions'); } diff --git a/react/features/transcribing/functions.ts b/react/features/transcribing/functions.ts index 7641fc44a48..c5bdab5fb6d 100644 --- a/react/features/transcribing/functions.ts +++ b/react/features/transcribing/functions.ts @@ -78,7 +78,7 @@ export function isRecorderTranscriptionsRunning(state: IReduxState) { export function canAddTranscriber(state: IReduxState) { const { transcription } = state['features/base/config']; const isModerator = isLocalParticipantModerator(state); - const isTranscribingAllowed = isJwtFeatureEnabled(state, 'transcription', isModerator, isModerator); + const isTranscribingAllowed = isJwtFeatureEnabled(state, 'transcription', isModerator, false); return Boolean(transcription?.enabled) && isTranscribingAllowed; }