Skip to content
Snippets Groups Projects
Unverified Commit 8eb9d024 authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Fix migration 86

parent ca2d9e28
No related merge requests found
RocketChat.Migrations.add({
version: 86,
up: function() {
if (RocketChat && RocketChat.models && RocketChat.models.Users) {
RocketChat.models.Users.update({ newMessageNotification: false }, { $set: { newMessageNotification: 'none' } }, { multi: true });
RocketChat.models.Users.update({ newMessageNotification: true }, { $unset: { newMessageNotification: 1 } }, { multi: true });
RocketChat.models.Users.update({ newRoomNotification: false }, { $set: { newRoomNotification: 'none' } }, { multi: true });
RocketChat.models.Users.update({ newRoomNotification: true }, { $unset: { newRoomNotification: 1 } }, { multi: true });
}
// Disabled this migration for it was not updating any user
}
});
RocketChat.Migrations.add({
version: 87,
up: function() {
if (RocketChat && RocketChat.models && RocketChat.models.Users) {
RocketChat.models.Users.update({ 'settings.preferences.newMessageNotification': false }, { $set: { 'settings.preferences.newMessageNotification': 'none' } }, { multi: true });
RocketChat.models.Users.update({ 'settings.preferences.newMessageNotification': true }, { $unset: { 'settings.preferences.newMessageNotification': 1 } }, { multi: true });
RocketChat.models.Users.update({ 'settings.preferences.newRoomNotification': false }, { $set: { 'settings.preferences.newRoomNotification': 'none' } }, { multi: true });
RocketChat.models.Users.update({ 'settings.preferences.newRoomNotification': true }, { $unset: { 'settings.preferences.newRoomNotification': 1 } }, { multi: true });
}
}
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment