From 84dde6c5c54eced4a4850f2add0508abdeed4480 Mon Sep 17 00:00:00 2001 From: Nathan Byrd Date: Fri, 13 Jan 2023 13:26:12 -0600 Subject: [PATCH] Small bugfixes --- core/activitypub/util.js | 4 ++-- core/servers/content/web_handlers/activitypub.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/activitypub/util.js b/core/activitypub/util.js index be8e0282..1461c940 100644 --- a/core/activitypub/util.js +++ b/core/activitypub/util.js @@ -99,8 +99,8 @@ function getUserProfileTemplatedBody( defaultContentType, cb ) { - const Log = require('./logger').log; - const Config = require('./config').get; + const Log = require('../logger').log; + const Config = require('../config').get; waterfall( [ diff --git a/core/servers/content/web_handlers/activitypub.js b/core/servers/content/web_handlers/activitypub.js index f77290d2..705ec1d2 100644 --- a/core/servers/content/web_handlers/activitypub.js +++ b/core/servers/content/web_handlers/activitypub.js @@ -92,7 +92,9 @@ exports.getModule = class ActivityPubWebHandler extends WebHandlerModule { 'application/ld+json', 'application/json', ]; - sendActor = accept.some(v => headerValues.includes(v)); + if (accept.some(v => headerValues.includes(v))) { + sendActor = true; + } if (sendActor) { return this._selfAsActorHandler(user, req, resp);