Merge remote-tracking branch 'origin/hashtalk' into hashtalk

v1.18.x
Julian Lam 11 years ago
commit 528ee3ad05

@ -120,6 +120,11 @@ var async = require('async'),
Notifications.push = function(notification, uids, callback) {
callback = callback || function() {};
if (!notification.nid) {
return callback();
}
var websockets = require('./socket.io');
if (!Array.isArray(uids)) {
uids = [uids];
@ -183,7 +188,7 @@ var async = require('async'),
return callback();
}
var notificationKeys = nids.map(function(nid) {
var notificationKeys = nids.filter(Boolean).map(function(nid) {
return 'notifications:' + nid;
});

@ -71,9 +71,7 @@ var async = require('async'),
winston.info('[notifications.get] nid ' + nids[index] + ' not found. Removing.');
}
if (nids[index]) {
deletedNids.push(nids[index]);
}
deletedNids.push(nids[index]);
}
});

Loading…
Cancel
Save