fix: pass proper uid to privilege check in AP note federation

This commit is contained in:
Julian Lam
2024-03-06 15:07:56 -05:00
parent 0c2cfbe7a0
commit 95427c4af7

View File

@@ -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;