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

10 lines
370 B

RocketChat.Migrations.add({
version: 71,
up: function() {
//Removes the reactions on messages which are the system type "rm" ;)
RocketChat.models.Messages.find({ 't': 'rm', 'reactions': { $exists: true, $not: {$size: 0} } }, { t: 1 }).forEach(function(message) {
RocketChat.models.Messages.update({ _id: message._id }, { $set: { reactions: [] }});
});
}
});