mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-18 21:42:55 +01:00
suggested topics fix, if search doesn't return enough topics
This commit is contained in:
@@ -93,7 +93,8 @@ module.exports = function (Topics) {
|
||||
db.getSortedSetRevRange('cid:' + cid + ':tids:lastposttime', 0, 9, next);
|
||||
},
|
||||
function (tids, next) {
|
||||
next(null, tids.map(Number));
|
||||
tids = tids.map(Number).filter(_tid => _tid !== tid);
|
||||
next(null, _.shuffle(tids));
|
||||
},
|
||||
], callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user