From 8dd28e3091e860c70b0a3ac29622fee4626cf616 Mon Sep 17 00:00:00 2001 From: Nathan Byrd Date: Thu, 26 Jan 2023 19:18:25 -0600 Subject: [PATCH] Fixed not-found and similar errors case --- core/activitypub/actor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/activitypub/actor.js b/core/activitypub/actor.js index 3d298ea2..94a66930 100644 --- a/core/activitypub/actor.js +++ b/core/activitypub/actor.js @@ -151,9 +151,13 @@ module.exports = class Actor extends ActivityPubObject { // cache miss: attempt to fetch & populate Actor._fromWebFinger(id, (err, actor, subject) => { + if (err) { + return cb(err); + } + if (subject) { subject = `@${userNameFromSubject(subject)}`; // e.g. @Username@host.com - } else { + } else if (!_.isEmpty(actor)) { subject = actor.id; // best we can do for now }