fix getUnreadByField

This commit is contained in:
barisusakli
2014-09-30 23:19:53 -04:00
parent 4f2603afd1
commit 5ff293109d

View File

@@ -228,9 +228,10 @@ var async = require('async'),
if (err) {
return callback(err);
}
value = value ? value.toString() : '';
nids = notifications.filter(function(notification) {
return notification && notification[field] !== value;
return notification && notification[field] === value;
}).map(function(notification) {
return notification.nid;
});