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

14 lines
379 B

import { Migrations } from '../../../app/migrations';
import { Messages } from '../../../app/models';
Migrations.add({
version: 56,
up() {
Messages.find({ _id: /\./ }).forEach(function(message) {
const oldId = message._id;
message._id = message._id.replace(/(.*)\.S?(.*)/, 'slack-$1-$2');
Messages.insert(message);
Messages.remove({ _id: oldId });
});
},
});