From efa0a132c423da6ff0e9e49f74097d58f0bbcf05 Mon Sep 17 00:00:00 2001 From: Robert Pintilii Date: Wed, 3 Aug 2022 10:31:00 +0300 Subject: [PATCH] fix(config) Fix recording config backwards compatibility (#11953) Overwrite the new flag with the old one only if the new one is not set Fix hideStorageWarning config --- react/features/base/config/reducer.ts | 6 ++++-- .../components/Recording/StartRecordingDialogContent.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/react/features/base/config/reducer.ts b/react/features/base/config/reducer.ts index 986c6f045..385edc983 100644 --- a/react/features/base/config/reducer.ts +++ b/react/features/base/config/reducer.ts @@ -407,13 +407,15 @@ function _translateLegacyConfig(oldValue: IConfig) { } newValue.recordingService = newValue.recordingService || {}; - if (oldValue.fileRecordingsServiceEnabled !== undefined) { + if (oldValue.fileRecordingsServiceEnabled !== undefined + && newValue.recordingService.enabled === undefined) { newValue.recordingService = { ...newValue.recordingService, enabled: oldValue.fileRecordingsServiceEnabled }; } - if (oldValue.fileRecordingsServiceSharingEnabled !== undefined) { + if (oldValue.fileRecordingsServiceSharingEnabled !== undefined + && newValue.recordingService.sharingEnabled === undefined) { newValue.recordingService = { ...newValue.recordingService, sharingEnabled: oldValue.fileRecordingsServiceSharingEnabled diff --git a/react/features/recording/components/Recording/StartRecordingDialogContent.js b/react/features/recording/components/Recording/StartRecordingDialogContent.js index db0d2f024..b34422c78 100644 --- a/react/features/recording/components/Recording/StartRecordingDialogContent.js +++ b/react/features/recording/components/Recording/StartRecordingDialogContent.js @@ -760,7 +760,7 @@ function _mapStateToProps(state) { return { ..._abstractMapStateToProps(state), isVpaas: isVpaasMeeting(state), - _hideStorageWarning: state['features/base/config'].recording?.hideStorageWarning, + _hideStorageWarning: state['features/base/config'].recordingService?.hideStorageWarning, _localRecordingEnabled: !state['features/base/config'].localRecording?.disable, _localRecordingSelfEnabled: !state['features/base/config'].localRecording?.disableSelfRecording, _localRecordingNoNotification: !state['features/base/config'].localRecording?.notifyAllParticipants,