Fixed not-found and similar errors case

This commit is contained in:
Nathan Byrd 2023-01-26 19:18:25 -06:00
parent d624871a83
commit 8dd28e3091
1 changed files with 5 additions and 1 deletions

View File

@ -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
}