Node.js based forum software built for the modern web
refactor: dont include scheduled topics in unread
Barış Soner Uşaklı7bc9fe3b754c
diff --git a/src/topics/unread.js b/src/topics/unread.jsindex ed93f19abf..afdb3fc155 100644--- a/src/topics/unread.js+++ b/src/topics/unread.js@@ -141,8 +141,8 @@ module.exports = function (Topics) {});tids = await privileges.topics.filterTids('topics:read', tids, params.uid);- const topicData = (await Topics.getTopicsFields(tids, ['tid', 'cid', 'uid', 'postcount', 'deleted', 'scheduled', 'tags']))- .filter(t => t.scheduled || !t.deleted);+ const topicData = (await Topics.getTopicsFields(tids, ['tid', 'cid', 'uid', 'postcount', 'deleted', 'tags']))+ .filter(t => !t.deleted);const topicCids = _.uniq(topicData.map(topic => topic.cid)).filter(Boolean);const categoryWatchState = await categories.getWatchState(topicCids, params.uid);