Fix notification migration (#15783)

pull/15795/head
Diego Sampaio 6 years ago committed by GitHub
parent f7cfe61699
commit 4782364615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      server/startup/migrations/v161.js

@ -8,11 +8,15 @@ Migrations.add({
const mobileNotifications = Settings.findOne({ _id: 'Accounts_Default_User_Preferences_mobileNotifications' });
if (desktopNotifications && desktopNotifications.value === 'mentions') {
Settings.update({ _id: 'Accounts_Default_User_Preferences_desktopNotifications' }, { value: 'all' });
Settings.update({ _id: 'Accounts_Default_User_Preferences_desktopNotifications' }, {
$set: { value: 'all' },
});
}
if (mobileNotifications && mobileNotifications.value === 'mentions') {
Settings.update({ _id: 'Accounts_Default_User_Preferences_mobileNotifications' }, { value: 'all' });
Settings.update({ _id: 'Accounts_Default_User_Preferences_mobileNotifications' }, {
$set: { value: 'all' },
});
}
},
down() {

Loading…
Cancel
Save