diff options
Diffstat (limited to 'server/lib/activitypub/process/process-accept.ts')
-rw-r--r-- | server/lib/activitypub/process/process-accept.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/lib/activitypub/process/process-accept.ts b/server/lib/activitypub/process/process-accept.ts index b9d906ec9..551f09ea7 100644 --- a/server/lib/activitypub/process/process-accept.ts +++ b/server/lib/activitypub/process/process-accept.ts | |||
@@ -23,7 +23,9 @@ async function processAccept (actor: ActorModel, targetActor: ActorModel) { | |||
23 | const follow = await ActorFollowModel.loadByActorAndTarget(actor.id, targetActor.id) | 23 | const follow = await ActorFollowModel.loadByActorAndTarget(actor.id, targetActor.id) |
24 | if (!follow) throw new Error('Cannot find associated follow.') | 24 | if (!follow) throw new Error('Cannot find associated follow.') |
25 | 25 | ||
26 | follow.set('state', 'accepted') | 26 | if (follow.state !== 'accepted') { |
27 | await follow.save() | 27 | follow.set('state', 'accepted') |
28 | await addFetchOutboxJob(targetActor, undefined) | 28 | await follow.save() |
29 | await addFetchOutboxJob(targetActor, undefined) | ||
30 | } | ||
29 | } | 31 | } |