Node.js based forum software built for the modern web
fix: pass proper uid to privilege check in AP note federation
Julian Lam95427c4af71e
diff --git a/src/api/activitypub.js b/src/api/activitypub.jsindex c816aa0f12..4c98eef56c 100644--- a/src/api/activitypub.js+++ b/src/api/activitypub.js@@ -86,7 +86,7 @@ activitypubApi.create.post = enabledCheck(async (caller, { pid }) => {return;}- const allowed = await privileges.posts.can('topics:read', pid, activitypub._constants.uid);+ const allowed = await privileges.posts.can('topics:read', pid, caller.uid);if (!allowed) {winston.verbose(`[activitypub/api] Not federating creation of pid ${pid} to the fediverse due to privileges.`);return;