From 9e58b04c4edcb2af7044efdfc5a11af5da20806a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 22 Jan 2024 14:06:39 -0500 Subject: [PATCH] fix: response, not res --- src/activitypub/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/activitypub/index.js b/src/activitypub/index.js index 791472456e..bfca23ce07 100644 --- a/src/activitypub/index.js +++ b/src/activitypub/index.js @@ -89,13 +89,13 @@ ActivityPub.getPrivateKey = async (uid) => { ActivityPub.fetchPublicKey = async (uri) => { // Used for retrieving the public key from the passed-in keyId uri - const { res, body } = await request.get(uri, { + const { response, body } = await request.get(uri, { headers: { Accept: 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', }, }); - if (!String(res.statusCode).startsWith('2') || !body.hasOwnProperty('publicKey')) { + if (!String(response.statusCode).startsWith('2') || !body.hasOwnProperty('publicKey')) { throw new Error('[[error:activitypub.pubKey-not-found]]'); }