diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/actor.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index d728c81d1..edf38bc0a 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts | |||
@@ -211,7 +211,14 @@ async function refreshActorIfNeeded ( | |||
211 | const actor = fetchedType === 'all' ? actorArg : await ActorModel.loadByUrlAndPopulateAccountAndChannel(actorArg.url) | 211 | const actor = fetchedType === 'all' ? actorArg : await ActorModel.loadByUrlAndPopulateAccountAndChannel(actorArg.url) |
212 | 212 | ||
213 | try { | 213 | try { |
214 | const actorUrl = await getUrlFromWebfinger(actor.preferredUsername + '@' + actor.getHost()) | 214 | let actorUrl: string |
215 | try { | ||
216 | actorUrl = await getUrlFromWebfinger(actor.preferredUsername + '@' + actor.getHost()) | ||
217 | } catch (err) { | ||
218 | logger.warn('Cannot get actor URL from webfinger, keeping the old one.', err) | ||
219 | actorUrl = actor.url | ||
220 | } | ||
221 | |||
215 | const { result, statusCode } = await fetchRemoteActor(actorUrl) | 222 | const { result, statusCode } = await fetchRemoteActor(actorUrl) |
216 | 223 | ||
217 | if (statusCode === 404) { | 224 | if (statusCode === 404) { |
@@ -429,5 +436,3 @@ async function saveVideoChannel (actor: ActorModel, result: FetchRemoteActorResu | |||
429 | 436 | ||
430 | return videoChannelCreated | 437 | return videoChannelCreated |
431 | } | 438 | } |
432 | |||
433 | |||