Node.js based forum software built for the modern web
fix: update hasRelation condition to be true if cid is passed in in options
Julian Lam6964b1fd5644
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.jsindex 1c0b859d83..327b51e31e 100644--- a/src/activitypub/notes.js+++ b/src/activitypub/notes.js@@ -79,7 +79,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {mainPid = utils.isNumber(mainPid) ? parseInt(mainPid, 10) : mainPid;// Relation & privilege check for local categories- const hasRelation = options.skipChecks || hasTid || await assertRelation(chain[0]);+ const hasRelation = options.skipChecks || options.cid || hasTid || await assertRelation(chain[0]);const privilege = `topics:${tid ? 'reply' : 'create'}`;const allowed = await privileges.categories.can(privilege, cid, activitypub._constants.uid);if (!hasRelation || !allowed) {