Merge branch 'activitypub' of https://github.com/NodeBB/NodeBB into activitypub

This commit is contained in:
Barış Soner Uşaklı
2024-04-25 11:25:54 -04:00

View File

@@ -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) {