Node.js based forum software built for the modern web
fix: #12035, filter tids in mark all read
Barış Soner Uşaklı77d6d0abfcc7
diff --git a/src/topics/unread.js b/src/topics/unread.jsindex 63563525d5..c1666f7d91 100644--- a/src/topics/unread.js+++ b/src/topics/unread.js@@ -317,7 +317,8 @@ module.exports = function (Topics) {Topics.markAllRead = async function (uid) {const cutoff = await Topics.unreadCutoff(uid);- const tids = await db.getSortedSetRevRangeByScore('topics:recent', 0, -1, '+inf', cutoff);+ let tids = await db.getSortedSetRevRangeByScore('topics:recent', 0, -1, '+inf', cutoff);+ tids = await privileges.topics.filterTids('read', tids, uid);Topics.markTopicNotificationsRead(tids, uid);await Topics.markAsRead(tids, uid);await db.delete(`uid:${uid}:tids_unread`);