Skip to content

Node.js based forum software built for the modern web

fixed wrong calls of getSortedSetRevRangeByScore

frissdiegurke590604b288cd
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) {