mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fix: #12035, filter tids in mark all read
This commit is contained in:
		| @@ -317,7 +317,8 @@ module.exports = function (Topics) { | |||||||
|  |  | ||||||
| 	Topics.markAllRead = async function (uid) { | 	Topics.markAllRead = async function (uid) { | ||||||
| 		const cutoff = await Topics.unreadCutoff(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); | 		Topics.markTopicNotificationsRead(tids, uid); | ||||||
| 		await Topics.markAsRead(tids, uid); | 		await Topics.markAsRead(tids, uid); | ||||||
| 		await db.delete(`uid:${uid}:tids_unread`); | 		await db.delete(`uid:${uid}:tids_unread`); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user