mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-30 20:30:32 +01:00
fix: markAllRead to get tids based on same logic as unread page, instead of marking all recent posts read
This commit is contained in:
@@ -325,8 +325,7 @@ module.exports = function (Topics) {
|
||||
};
|
||||
|
||||
Topics.markAllRead = async function (uid) {
|
||||
const cutoff = await Topics.unreadCutoff(uid);
|
||||
let tids = await db.getSortedSetRevRangeByScore('topics:recent', 0, -1, '+inf', cutoff);
|
||||
let tids = await Topics.getUnreadTids({ uid });
|
||||
tids = await privileges.topics.filterTids('topics:read', tids, uid);
|
||||
Topics.markTopicNotificationsRead(tids, uid);
|
||||
await Topics.markAsRead(tids, uid);
|
||||
|
||||
Reference in New Issue
Block a user