mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7008
This commit is contained in:
@@ -51,7 +51,11 @@ recentController.getData = function (req, url, sort, callback) {
|
|||||||
user.getSettings(req.uid, next);
|
user.getSettings(req.uid, next);
|
||||||
},
|
},
|
||||||
categories: function (next) {
|
categories: function (next) {
|
||||||
helpers.getCategoriesByStates(req.uid, cid, [categories.watchStates.watching, categories.watchStates.notwatching], next);
|
const states = [categories.watchStates.watching, categories.watchStates.notwatching];
|
||||||
|
if (filter === 'watched') {
|
||||||
|
states.push(categories.watchStates.ignoring);
|
||||||
|
}
|
||||||
|
helpers.getCategoriesByStates(req.uid, cid, states, next);
|
||||||
},
|
},
|
||||||
rssToken: function (next) {
|
rssToken: function (next) {
|
||||||
user.auth.getFeedToken(req.uid, next);
|
user.auth.getFeedToken(req.uid, next);
|
||||||
|
|||||||
@@ -36,7 +36,11 @@ unreadController.get = function (req, res, next) {
|
|||||||
if (plugins.hasListeners('filter:unread.categories')) {
|
if (plugins.hasListeners('filter:unread.categories')) {
|
||||||
plugins.fireHook('filter:unread.categories', { uid: req.uid, cid: cid }, next);
|
plugins.fireHook('filter:unread.categories', { uid: req.uid, cid: cid }, next);
|
||||||
} else {
|
} else {
|
||||||
helpers.getCategoriesByStates(req.uid, cid, [categories.watchStates.watching], next);
|
const states = [categories.watchStates.watching];
|
||||||
|
if (filter === 'watched') {
|
||||||
|
states.push(categories.watchStates.notwatching, categories.watchStates.ignoring);
|
||||||
|
}
|
||||||
|
helpers.getCategoriesByStates(req.uid, cid, states, next);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
settings: function (next) {
|
settings: function (next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user