Skip to content

Commit

Permalink
Refresh orphan actors
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Jul 31, 2018
1 parent 365b546 commit 25e4d6e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/lib/activitypub/actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 25e4d6e

Please sign in to comment.