pruning empy notifications for daily emailer

v1.18.x
Julian Lam 11 years ago
parent 4f48f1865f
commit e6d0eede4f

@ -69,6 +69,10 @@ module.exports = function(User) {
winston.error('[user/jobs] Could not send daily digests: ' + err.message);
return next(err);
}
// Remove expired notifications
notifications = notifications.filter(Boolean);
// Turn relative URLs into absolute ones
for(var i=0; i<notifications.length; ++i) {
if (notifications[i].image.indexOf('http') !== 0) {

Loading…
Cancel
Save