defaulting daily digest frequency to null -- digests should be opt IN, not OUT. Bad idea on my part... re: #1499

v1.18.x
Julian Lam 11 years ago
parent 66abd20647
commit 2dd2d7a269

@ -48,7 +48,7 @@ module.exports = function(User) {
// Find uids subscribed to daily digest emails // Find uids subscribed to daily digest emails
subscribed = userSettings.filter(function(setting) { subscribed = userSettings.filter(function(setting) {
return !setting.dailyDigestFreq || setting.dailyDigestFreq === 'daily'; return setting.dailyDigestFreq === 'daily';
}).map(function(setting) { }).map(function(setting) {
return setting.uid; return setting.uid;
}); });

@ -26,7 +26,7 @@ module.exports = function(User) {
settings.showemail = settings.showemail ? parseInt(settings.showemail, 10) !== 0 : false; settings.showemail = settings.showemail ? parseInt(settings.showemail, 10) !== 0 : false;
settings.openOutgoingLinksInNewTab = settings.openOutgoingLinksInNewTab ? parseInt(settings.openOutgoingLinksInNewTab, 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.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.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; 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', { db.setObject('user:' + uid + ':settings', {
showemail: data.showemail, showemail: data.showemail,
openOutgoingLinksInNewTab: data.openOutgoingLinksInNewTab, openOutgoingLinksInNewTab: data.openOutgoingLinksInNewTab,
dailyDigestFreq: data.dailyDigestFreq || 'daily', dailyDigestFreq: data.dailyDigestFreq || 'off',
usePagination: data.usePagination, usePagination: data.usePagination,
topicsPerPage: data.topicsPerPage, topicsPerPage: data.topicsPerPage,
postsPerPage: data.postsPerPage, postsPerPage: data.postsPerPage,

Loading…
Cancel
Save