The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/server/startup/migrations/v246.ts

31 lines
876 B

import { addMigration } from '../../lib/migrations';
import { Settings } from '../../../app/models/server';
import { settings } from '../../../app/settings/server';
addMigration({
version: 246,
up() {
const livechatVideoCallEnabled = settings.get('Livechat_videocall_enabled');
if (livechatVideoCallEnabled) {
Settings.upsert(
{ _id: 'Omnichannel_call_provider' },
{
$set: { value: 'Jitsi' },
},
);
}
Settings.removeById('Livechat_videocall_enabled');
const webRTCEnableChannel = settings.get('WebRTC_Enable_Channel');
const webRTCEnableDirect = settings.get('WebRTC_Enable_Direct');
const webRTCEnablePrivate = settings.get('WebRTC_Enable_Private');
if (webRTCEnableChannel || webRTCEnableDirect || webRTCEnablePrivate) {
Settings.upsert(
{ _id: 'WebRTC_Enabled' },
{
$set: { value: true },
},
);
}
},
});