diff --git a/src/user/jobs.js b/src/user/jobs.js index 2655b96a67..d522a8097b 100644 --- a/src/user/jobs.js +++ b/src/user/jobs.js @@ -48,7 +48,7 @@ module.exports = function(User) { // Find uids subscribed to daily digest emails subscribed = userSettings.filter(function(setting) { - return !setting.dailyDigestFreq || setting.dailyDigestFreq === 'daily'; + return setting.dailyDigestFreq === 'daily'; }).map(function(setting) { return setting.uid; }); diff --git a/src/user/settings.js b/src/user/settings.js index 73b51c241d..93dcf0b171 100644 --- a/src/user/settings.js +++ b/src/user/settings.js @@ -26,7 +26,7 @@ module.exports = function(User) { settings.showemail = settings.showemail ? parseInt(settings.showemail, 10) !== 0 : false; settings.openOutgoingLinksInNewTab = settings.openOutgoingLinksInNewTab ? parseInt(settings.openOutgoingLinksInNewTab, 10) !== 0 : false; - settings.dailyDigestFreq = settings.dailyDigestFreq || 'daily'; + settings.dailyDigestFreq = settings.dailyDigestFreq || 'off'; settings.usePagination = settings.usePagination ? parseInt(settings.usePagination, 10) === 1 : parseInt(meta.config.usePagination, 10) === 1; settings.topicsPerPage = settings.topicsPerPage ? parseInt(settings.topicsPerPage, 10) : parseInt(meta.config.topicsPerPage, 10) || 20; settings.postsPerPage = settings.postsPerPage ? parseInt(settings.postsPerPage, 10) : parseInt(meta.config.postsPerPage, 10) || 10; @@ -74,7 +74,7 @@ module.exports = function(User) { db.setObject('user:' + uid + ':settings', { showemail: data.showemail, openOutgoingLinksInNewTab: data.openOutgoingLinksInNewTab, - dailyDigestFreq: data.dailyDigestFreq || 'daily', + dailyDigestFreq: data.dailyDigestFreq || 'off', usePagination: data.usePagination, topicsPerPage: data.topicsPerPage, postsPerPage: data.postsPerPage,