Skip to content

Node.js based forum software built for the modern web

fix: #7008

Baris Usakli756dfd8ae68b
diff --git a/src/controllers/recent.js b/src/controllers/recent.js
index 2b58bd9b99..ed7f8e5ea4 100644
--- a/src/controllers/recent.js
+++ b/src/controllers/recent.js
@@ -51,7 +51,11 @@ recentController.getData = function (req, url, sort, callback) {
user.getSettings(req.uid, 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) {
user.auth.getFeedToken(req.uid, next);
diff --git a/src/controllers/unread.js b/src/controllers/unread.js
index c1f9804437..faafc50b83 100644
--- a/src/controllers/unread.js
+++ b/src/controllers/unread.js
@@ -36,7 +36,11 @@ unreadController.get = function (req, res, next) {
if (plugins.hasListeners('filter:unread.categories')) {
plugins.fireHook('filter:unread.categories', { uid: req.uid, cid: cid }, next);
} 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) {