Skipping digest sending if no notifs and no new topics, #2455

v1.18.x
Julian Lam 10 years ago
parent 1b526026a0
commit a31525c79f

@ -84,6 +84,11 @@ module.exports = (function(Digest) {
notifications = notifications.filter(Boolean);
// If there are no notifications and no new topics, don't bother sending a digest
if (!notifications.length && !data.topics.topics.length) {
return next();
}
for(var i=0; i<notifications.length; ++i) {
if (notifications[i].image.indexOf('http') !== 0) {
notifications[i].image = nconf.get('url') + notifications[i].image;

Loading…
Cancel
Save