diff options
Diffstat (limited to 'server/lib/activitypub/process/process-accept.ts')
-rw-r--r-- | server/lib/activitypub/process/process-accept.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/activitypub/process/process-accept.ts b/server/lib/activitypub/process/process-accept.ts index 7db2f8ff0..c55b57820 100644 --- a/server/lib/activitypub/process/process-accept.ts +++ b/server/lib/activitypub/process/process-accept.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { ActivityAccept } from '../../../../shared/models/activitypub' | 1 | import { ActivityAccept } from '../../../../shared/models/activitypub' |
2 | import { getActorUrl } from '../../../helpers/activitypub' | ||
2 | import { ActorModel } from '../../../models/activitypub/actor' | 3 | import { ActorModel } from '../../../models/activitypub/actor' |
3 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 4 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
4 | import { addFetchOutboxJob } from '../fetch' | 5 | import { addFetchOutboxJob } from '../fetch' |
@@ -6,7 +7,8 @@ import { addFetchOutboxJob } from '../fetch' | |||
6 | async function processAcceptActivity (activity: ActivityAccept, inboxActor?: ActorModel) { | 7 | async function processAcceptActivity (activity: ActivityAccept, inboxActor?: ActorModel) { |
7 | if (inboxActor === undefined) throw new Error('Need to accept on explicit inbox.') | 8 | if (inboxActor === undefined) throw new Error('Need to accept on explicit inbox.') |
8 | 9 | ||
9 | const targetActor = await ActorModel.loadByUrl(activity.actor) | 10 | const actorUrl = getActorUrl(activity.actor) |
11 | const targetActor = await ActorModel.loadByUrl(actorUrl) | ||
10 | 12 | ||
11 | return processAccept(inboxActor, targetActor) | 13 | return processAccept(inboxActor, targetActor) |
12 | } | 14 | } |