From b48f850eac6402817aa6c7bc712bea58f0f58408 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Thu, 8 Nov 2018 10:14:54 -0600 Subject: [PATCH] fix(script): don't send to users who have already opted out of notifs --- migrations/archive/2018/20181108_username_email.js | 1 + 1 file changed, 1 insertion(+) diff --git a/migrations/archive/2018/20181108_username_email.js b/migrations/archive/2018/20181108_username_email.js index 2040498412..fa64e43167 100644 --- a/migrations/archive/2018/20181108_username_email.js +++ b/migrations/archive/2018/20181108_username_email.js @@ -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')}, };