From 25e4d6ee97e9b7a80338cb9c3db5169bf633e32f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 31 Jul 2018 11:04:33 +0200 Subject: Refresh orphan actors --- server/lib/activitypub/actor.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/lib') 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) { -- cgit v1.2.3