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

10 lines
395 B

RocketChat.Migrations.add({
version: 55,
up() {
RocketChat.models.Rooms.find({ 'topic': { $exists: 1, $ne: '' } }, { topic: 1 }).forEach(function(room) {
const topic = s.escapeHTML(room.topic);
RocketChat.models.Rooms.update({ _id: room._id }, { $set: { topic }});
RocketChat.models.Messages.update({ t: 'room_changed_topic', rid: room._id }, { $set: { msg: topic }});
});
}
});