Skip to content

Commit

Permalink
squash: Uses constant coming from ljm.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho committed Sep 10, 2024
1 parent ef7ef96 commit bccbb5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions react/features/subtitles/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { AnyAction } from 'redux';
import { IStore } from '../app/types';
import { ENDPOINT_MESSAGE_RECEIVED } from '../base/conference/actionTypes';
import { isJwtFeatureEnabled } from '../base/jwt/functions';
import JitsiMeetJS from '../base/lib-jitsi-meet';
import { isLocalParticipantModerator } from '../base/participants/functions';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';

Expand Down Expand Up @@ -246,12 +247,12 @@ function _requestingSubtitlesChange(
P_NAME_REQUESTING_TRANSCRIPTION,
enabled);

if (enabled && conference?.getTranscriptionStatus() === 'off') {
if (enabled && conference?.getTranscriptionStatus() === JitsiMeetJS.constants.transcriptionStatus.OFF) {
const isModerator = isLocalParticipantModerator(state);
const featureAllowed = isJwtFeatureEnabled(getState(), 'transcription', isModerator, isModerator);

if (featureAllowed) {
conference.dial(TRANSCRIBER_DIAL_NUMBER)
conference?.dial(TRANSCRIBER_DIAL_NUMBER)
.catch((e: any) => {
console.error('some error', e);
});
Expand Down

0 comments on commit bccbb5b

Please sign in to comment.