mirror of https://github.com/Chocobozzz/PeerTube
Refresh orphan actors
parent
365b546c9f
commit
25e4d6ee97
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue