Skip to content

Node.js based forum software built for the modern web

fix: update getPrivateKey to send application actor key when cid 0

Julian Lama45f6f9c4cd1
diff --git a/src/activitypub/index.js b/src/activitypub/index.js
index 5971c69326..7b84148600 100644
--- a/src/activitypub/index.js
+++ b/src/activitypub/index.js
@@ -201,7 +201,7 @@ ActivityPub.getPrivateKey = async (type, id) => {
if (type === 'uid') {
keyId = `${nconf.get('url')}${id > 0 ? `/uid/${id}` : '/actor'}#key`;
} else {
- keyId = `${nconf.get('url')}/category/${id}#key`;
+ keyId = `${nconf.get('url')}${id > 0 ? `/category/${id}` : '/actor'}#key`;
}
return { key: privateKey, keyId };