// We don't have this actor in our database, fetch it on remote
if (!actor) {
const { result } = await fetchRemoteActor(actorUrl)
- if (result === undefined) throw new Error('Cannot fetch remote actor.')
+ if (result === undefined) throw new Error('Cannot fetch remote actor ' + actorUrl)
// Create the attributed to actor
// In PeerTube a video channel is owned by an account
created = true
}
+ if (actor.Account) actor.Account.Actor = actor
+ if (actor.VideoChannel) actor.VideoChannel.Actor = actor
+
const { actor: actorRefreshed, refreshed } = await retryTransactionWrapper(refreshActorIfNeeded, actor, fetchType)
if (!actorRefreshed) throw new Error('Actor ' + actorRefreshed.url + ' does not exist anymore.')