mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: only add to set if numRecentReplies>0
This commit is contained in:
@@ -33,8 +33,9 @@ module.exports = function (Categories) {
|
||||
await db.sortedSetsRemoveRangeByScore(['cid:' + cid + ':recent_tids'], '-inf', data[data.length - 1].score);
|
||||
}
|
||||
}
|
||||
|
||||
await db.sortedSetAdd('cid:' + cid + ':recent_tids', Date.now(), tid);
|
||||
if (numRecentReplies > 0) {
|
||||
await db.sortedSetAdd('cid:' + cid + ':recent_tids', Date.now(), tid);
|
||||
}
|
||||
await plugins.fireHook('action:categories.updateRecentTid', { cid: cid, tid: tid });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user