@ -367,4 +367,8 @@ SocketPosts.getCategory = function(socket, pid, callback) {
posts.getCidByPid(pid, callback);
};
SocketPosts.getPidIndex = function(socket, pid, callback) {
posts.getPidIndex(pid, socket.uid, callback);
module.exports = SocketPosts;
@ -254,7 +254,7 @@ var async = require('async'),
}
notifications = notifications.filter(function(notification) {
return !!notification || notification[field] !== value.toString();
return notification && notification[field] !== value.toString();
}).map(function(notification) {
return notification.nid;
});