From 590604b288cd7308655d136a2a66c1d3194140b8 Mon Sep 17 00:00:00 2001 From: frissdiegurke Date: Sun, 20 Apr 2014 07:23:19 +0200 Subject: [PATCH] fixed wrong calls of getSortedSetRevRangeByScore --- src/user/notifications.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/user/notifications.js b/src/user/notifications.js index fd6c0dab72..6dcc17da19 100644 --- a/src/user/notifications.js +++ b/src/user/notifications.js @@ -82,11 +82,8 @@ var async = require('async'), before = new Date(parseInt(before, 10)); } - var args1 = ['uid:' + uid + ':notifications:read', before ? before.getTime(): now.getTime(), -Infinity, 'LIMIT', 0, limit]; - var args2 = ['uid:' + uid + ':notifications:unread', before ? before.getTime(): now.getTime(), -Infinity, 'LIMIT', 0, limit]; - - db.getSortedSetRevRangeByScore(args1, function(err, results1) { - db.getSortedSetRevRangeByScore(args2, function(err, results2) { + db.getSortedSetRevRangeByScore('uid:' + uid + ':notifications:read', 0, limit, before ? before.getTime(): now.getTime(), -Infinity, function(err, results1) { + db.getSortedSetRevRangeByScore('uid:' + uid + ':notifications:unread', 0, limit, before ? before.getTime(): now.getTime(), -Infinity, function(err, results2) { var nids = results1.concat(results2); async.map(nids, function(nid, next) {