Skip to content

Commit 25e4d6e

Browse files
committed
Refresh orphan actors
1 parent 365b546 commit 25e4d6e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/lib/activitypub/actor.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ async function getOrCreateActorAndServerAndModel (activityActor: string | Activi
4040
const actorUrl = getActorUrl(activityActor)
4141

4242
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+
}
4348

4449
// We don't have this actor in our database, fetch it on remote
4550
if (!actor) {

0 commit comments

Comments
 (0)