mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
fix: pass proper uid to privilege check in AP note federation
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user