Node.js based forum software built for the modern web
fix: minor cleanup
Julian Lam129017f735d8
diff --git a/src/api/activitypub.js b/src/api/activitypub.jsindex dcc62366f2..cf83da19ff 100644--- a/src/api/activitypub.js+++ b/src/api/activitypub.js@@ -225,9 +225,7 @@ activitypubApi.delete.note = enabledCheck(async (caller, { pid }) => {const id = `${nconf.get('url')}/post/${pid}`;const post = (await posts.getPostSummaryByPids([pid], caller.uid, { stripTags: false })).pop();const object = await activitypub.mocks.note(post);- const { tid, uid } = await posts.getPostFields(pid, ['tid', 'uid']);- const origin = `${nconf.get('url')}/topic/${tid}`;- const { to, cc, targets } = await buildRecipients(object, { pid, uid });+ const { to, cc, targets } = await buildRecipients(object, { pid, uid: post.user.uid });const allowed = await privileges.posts.can('topics:read', pid, activitypub._constants.uid);if (!allowed) {@@ -241,7 +239,7 @@ activitypubApi.delete.note = enabledCheck(async (caller, { pid }) => {to,cc,object: id,- origin,+ origin: object.context,};await activitypub.send('uid', caller.uid, Array.from(targets), payload);