projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
365b546
)
Refresh orphan actors
author
Chocobozzz
<me@florianbigard.com>
Tue, 31 Jul 2018 09:04:33 +0000
(11:04 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Tue, 31 Jul 2018 09:04:33 +0000
(11:04 +0200)
server/lib/activitypub/actor.ts
patch
|
blob
|
history
diff --git
a/server/lib/activitypub/actor.ts
b/server/lib/activitypub/actor.ts
index 9257d7d209843ac75c763ef09dff0caee661eae2..7f2fc32365f7a6a7289888744efae05bbd8ffb00 100644
(file)
--- 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) {