fix: accidental passing of string instead of constant

This commit is contained in:
Julian Lam
2024-07-24 11:54:41 -04:00
parent 83993cad17
commit 7bf349b62b

View File

@@ -319,7 +319,7 @@ inbox.follow = async (req) => {
} else if (type === 'category') { } else if (type === 'category') {
const [exists, allowed] = await Promise.all([ const [exists, allowed] = await Promise.all([
categories.exists(id), categories.exists(id),
privileges.categories.can('read', id, 'activitypub._constants.uid'), privileges.categories.can('read', id, activitypub._constants.uid),
]); ]);
if (!exists) { if (!exists) {
throw new Error('[[error:invalid-cid]]'); throw new Error('[[error:invalid-cid]]');