From 5ff293109d90dae5345b3afa7fbe8679550485d3 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 30 Sep 2014 23:19:53 -0400 Subject: [PATCH] fix getUnreadByField --- src/user/notifications.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/user/notifications.js b/src/user/notifications.js index 2edaadb763..f2784c373c 100644 --- a/src/user/notifications.js +++ b/src/user/notifications.js @@ -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; });