Fixed not-found and similar errors case
This commit is contained in:
parent
d624871a83
commit
8dd28e3091
|
@ -151,9 +151,13 @@ module.exports = class Actor extends ActivityPubObject {
|
||||||
|
|
||||||
// cache miss: attempt to fetch & populate
|
// cache miss: attempt to fetch & populate
|
||||||
Actor._fromWebFinger(id, (err, actor, subject) => {
|
Actor._fromWebFinger(id, (err, actor, subject) => {
|
||||||
|
if (err) {
|
||||||
|
return cb(err);
|
||||||
|
}
|
||||||
|
|
||||||
if (subject) {
|
if (subject) {
|
||||||
subject = `@${userNameFromSubject(subject)}`; // e.g. @Username@host.com
|
subject = `@${userNameFromSubject(subject)}`; // e.g. @Username@host.com
|
||||||
} else {
|
} else if (!_.isEmpty(actor)) {
|
||||||
subject = actor.id; // best we can do for now
|
subject = actor.id; // best we can do for now
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue