chore: minor cleanup

This commit is contained in:
Julian Lam
2024-04-16 13:38:05 -04:00
parent 407dda78e1
commit 1253ded7d5
2 changed files with 1 additions and 4 deletions

View File

@@ -74,8 +74,8 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
mainPid = utils.isNumber(mainPid) ? parseInt(mainPid, 10) : mainPid;
// Relation & privilege check for local categories
const privilege = `topics:${tid ? 'reply' : 'create'}`;
const hasRelation = options.skipChecks || 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) {
if (!hasRelation) {