aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-31 11:04:33 +0200
committerChocobozzz <me@florianbigard.com>2018-07-31 11:04:33 +0200
commit25e4d6ee97e9b7a80338cb9c3db5169bf633e32f (patch)
treede37f23eab4be51aac3f442b2ebb62e281272f3f /server/lib/activitypub
parent365b546c9fbc2a8a7f9c7de7da25209cd83e73d8 (diff)
downloadPeerTube-25e4d6ee97e9b7a80338cb9c3db5169bf633e32f.tar.gz
PeerTube-25e4d6ee97e9b7a80338cb9c3db5169bf633e32f.tar.zst
PeerTube-25e4d6ee97e9b7a80338cb9c3db5169bf633e32f.zip
Refresh orphan actors
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/actor.ts5
1 files changed, 5 insertions, 0 deletions
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
40 const actorUrl = getActorUrl(activityActor) 40 const actorUrl = getActorUrl(activityActor)
41 41
42 let actor = await ActorModel.loadByUrl(actorUrl) 42 let actor = await ActorModel.loadByUrl(actorUrl)
43 // Orphan actor (not associated to an account of channel) so recreate it
44 if (!actor.Account && !actor.VideoChannel) {
45 await actor.destroy()
46 actor = null
47 }
43 48
44 // We don't have this actor in our database, fetch it on remote 49 // We don't have this actor in our database, fetch it on remote
45 if (!actor) { 50 if (!actor) {