mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 20:41:17 +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) {
|
Topics.markAllRead = async function (uid) {
|
||||||
const cutoff = await Topics.unreadCutoff(uid);
|
let tids = await Topics.getUnreadTids({ uid });
|
||||||
let tids = await db.getSortedSetRevRangeByScore('topics:recent', 0, -1, '+inf', cutoff);
|
|
||||||
tids = await privileges.topics.filterTids('topics:read', tids, uid);
|
tids = await privileges.topics.filterTids('topics:read', tids, uid);
|
||||||
Topics.markTopicNotificationsRead(tids, uid);
|
Topics.markTopicNotificationsRead(tids, uid);
|
||||||
await Topics.markAsRead(tids, uid);
|
await Topics.markAsRead(tids, uid);
|
||||||
|
|||||||
Reference in New Issue
Block a user