mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	early outs for privs
no need to check if empty array is passed in, happens if there are no unread topics remove dupe cids before checking for privileges
This commit is contained in:
		| @@ -77,6 +77,9 @@ module.exports = function(privileges) { | ||||
| 	}; | ||||
|  | ||||
| 	privileges.posts.filter = function(privilege, pids, uid, callback) { | ||||
| 		if (!pids.length) { | ||||
| 			return callback(null, []); | ||||
| 		} | ||||
| 		posts.getCidsByPids(pids, function(err, cids) { | ||||
| 			if (err) { | ||||
| 				return callback(err); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user