fix(script): don't send to users who have already opted out of notifs

This commit is contained in:
Sabe Jones 2018-11-08 10:14:54 -06:00
parent 5d6b6ed29a
commit b48f850eac

View file

@ -17,6 +17,7 @@ function processUsers (lastId) {
// specify a query to limit the affected users (empty for all users):
let query = {
migration: {$ne: MIGRATION_NAME},
'preferences.emailNotifications.majorUpdates': {$ne: false},
'flags.verifiedUsername': {$ne: true},
'auth.timestamps.loggedin': {$gt: new Date('2018-10-25')},
};