diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index 9257d7d20..7f2fc3236 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts @@ -40,6 +40,11 @@ async function getOrCreateActorAndServerAndModel (activityActor: string | Activi const actorUrl = getActorUrl(activityActor) let actor = await ActorModel.loadByUrl(actorUrl) + // Orphan actor (not associated to an account of channel) so recreate it + if (!actor.Account && !actor.VideoChannel) { + await actor.destroy() + actor = null + } // We don't have this actor in our database, fetch it on remote if (!actor) {