From 6104adc3e9d325e003ca1048e8ef35f6a451d0c3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 31 Jul 2018 11:15:35 +0200 Subject: Don't send follow request if the follow is already accepted --- server/lib/activitypub/actor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/lib/activitypub') diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index 7f2fc3236..b67d9f08b 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts @@ -41,7 +41,7 @@ async function getOrCreateActorAndServerAndModel (activityActor: string | Activi let actor = await ActorModel.loadByUrl(actorUrl) // Orphan actor (not associated to an account of channel) so recreate it - if (!actor.Account && !actor.VideoChannel) { + if (actor && (!actor.Account && !actor.VideoChannel)) { await actor.destroy() actor = null } -- cgit v1.2.3