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

15 lines
349 B

RocketChat.Migrations.add({
version: 72,
up() {
RocketChat.models.Users.find({ type: 'visitor', 'emails.address': { $exists: true } }, { emails: 1 }).forEach(function(visitor) {
RocketChat.models.Users.update({ _id: visitor._id }, {
$set: {
visitorEmails: visitor.emails
},
$unset: {
emails: 1
}
});
});
}
});