mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fix: inputIndex check
This commit is contained in:
		| @@ -111,7 +111,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => { | |||||||
| 	const hasRelation = | 	const hasRelation = | ||||||
| 		uid || hasTid || | 		uid || hasTid || | ||||||
| 		options.skipChecks || options.cid || | 		options.skipChecks || options.cid || | ||||||
| 		await assertRelation(chain[inputIndex || 0]); | 		await assertRelation(chain[inputIndex !== -1 ? inputIndex : 0]); | ||||||
| 	const privilege = `topics:${tid ? 'reply' : 'create'}`; | 	const privilege = `topics:${tid ? 'reply' : 'create'}`; | ||||||
| 	const allowed = await privileges.categories.can(privilege, cid, activitypub._constants.uid); | 	const allowed = await privileges.categories.can(privilege, cid, activitypub._constants.uid); | ||||||
| 	if (!hasRelation || !allowed) { | 	if (!hasRelation || !allowed) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user