Node.js based forum software built for the modern web
fix(activitypub): correct assertion check in Out.follow
Julian Lama0fdef709f40
diff --git a/src/activitypub/out.js b/src/activitypub/out.jsindex 456e5d326d..526e4ad13a 100644--- a/src/activitypub/out.js+++ b/src/activitypub/out.js@@ -40,7 +40,7 @@ Out.follow = enabledCheck(async (type, id, actor) => {// Privilege checks should be done upstreamconst acceptedTypes = ['uid', 'cid'];const assertion = await activitypub.actors.assert(actor);- if (!acceptedTypes.includes(type) || !assertion || (Array.isArray(assertion) && assertion.length)) {+ if (!acceptedTypes.includes(type) || !assertion || (Array.isArray(assertion) && !assertion.length)) {throw new Error('[[error:activitypub.invalid-id]]');}