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/v155.js

34 lines
633 B

import { Migrations } from '../../../app/migrations/server';
import { Settings } from '../../../app/models/server';
Migrations.add({
version: 155,
up() {
const _id = 'Livechat_Routing_Method';
const setting = Settings.findOne({ _id });
if (setting) {
const { value } = setting;
let newValue;
switch (value) {
case 'Least_Amount':
newValue = 'Auto_Selection';
break;
case 'Guest_Pool':
newValue = 'Manual_Selection';
break;
}
if (!newValue) {
return;
}
Settings.update({ _id }, {
$set: {
value: newValue,
packageValue: newValue,
},
});
}
},
});