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

19 lines
499 B

import { Migrations } from '../../../app/migrations';
import { Integrations } from '../../../app/models';
Migrations.add({
version: 79,
up() {
const integrations = Integrations.find({ type: 'webhook-incoming' }).fetch();
for (const integration of integrations) {
if (typeof integration.channel === 'string') {
Integrations.update({ _id: integration._id }, {
$set: {
channel: integration.channel.split(',').map((channel) => channel.trim()),
},
});
}
}
},
});