This commit is contained in:
barisusakli
2014-04-07 18:54:55 -04:00
parent a150b2c6f7
commit 67f9c8670a

View File

@@ -36,6 +36,13 @@ module.exports = function(User) {
async.each(data.uids, function(uid, next) { async.each(data.uids, function(uid, next) {
UserNotifications.getDailyUnread(uid, function(err, notifications) { UserNotifications.getDailyUnread(uid, function(err, notifications) {
if (!err && notifications && notifications.length) { if (!err && notifications && notifications.length) {
for(var i=0; i<notifications.length; ++i) {
if (notifications[i].image.indexOf('http') !== 0) {
notifications[i].image = nconf.get('url') + notifications[i].image;
}
}
user.getUserField(uid, 'username', function(err, username) { user.getUserField(uid, 'username', function(err, username) {
// Send daily digest email // Send daily digest email
// winston.info('[user/notifications] Sending Daily Digest to uid ' + uid); // winston.info('[user/notifications] Sending Daily Digest to uid ' + uid);