From e6d0eede4fc542805c017213f73f242517863867 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 2 Sep 2014 18:36:28 -0400 Subject: [PATCH] pruning empy notifications for daily emailer --- src/user/jobs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/user/jobs.js b/src/user/jobs.js index 160f3bb33c..d06a8386cd 100644 --- a/src/user/jobs.js +++ b/src/user/jobs.js @@ -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