properly filter /unread /recent /popular /top (#7927)

* feat: add failing test for pagination

* feat: test

* fix: redis tests

* refactor: remove logs

* fix: add new test

* feat: make sortedSetRangeByScore work with keys on redis

* fix: hardcoded set name

* feat: show topics from readable categories on recent/popular/top

* feat: rewrite unread topics

respect watched categories and followed topics

* fix: term + watched
This commit is contained in:
Barış Soner Uşaklı
2019-09-26 21:55:49 -04:00
committed by GitHub
parent 17437897f9
commit 310c6fd33f
12 changed files with 171 additions and 193 deletions

View File

@@ -77,7 +77,7 @@ Categories.getAllCategories = async function (uid) {
};
Categories.getCidsByPrivilege = async function (set, uid, privilege) {
const cids = await Categories.getAllCidsFromSet('categories:cid');
const cids = await Categories.getAllCidsFromSet(set);
return await privileges.categories.filterCids(privilege, cids, uid);
};