mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
Category watch state (#7109)
* feat: wip, category watch change * feat: pass data to client * feat: allow changing state * fix: account page categories * fix: show in unread if topic is followed or category is watched * feat: add default watch state to acp * feat: save user category watch state * feat: update unread recent pages * fix: remove dupe code * fix: flip conditions * fix: handle empty arrays * fix: ignore/watch on others profile * feat: upgrade script for category states if there are any users ignoring categories set their state in new zset and delete cid:<cid>:ignorers * fix: upgrade * fix: tests * fix: redis count * fix: more tests
This commit is contained in:
committed by
GitHub
parent
2104877c76
commit
eb7ae54f81
@@ -8,6 +8,7 @@ var querystring = require('querystring');
|
||||
var meta = require('../meta');
|
||||
var pagination = require('../pagination');
|
||||
var user = require('../user');
|
||||
var categories = require('../categories');
|
||||
var topics = require('../topics');
|
||||
var plugins = require('../plugins');
|
||||
var helpers = require('./helpers');
|
||||
@@ -35,7 +36,7 @@ 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.getWatchedCategories(req.uid, cid, next);
|
||||
helpers.getCategoriesByStates(req.uid, cid, [categories.watchStates.watching], next);
|
||||
}
|
||||
},
|
||||
settings: function (next) {
|
||||
|
||||
Reference in New Issue
Block a user