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
This commit is contained in:
Robert Pintilii 2022-08-03 10:31:00 +03:00 committed by GitHub
parent 083b009eba
commit efa0a132c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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,