diff options
Diffstat (limited to 'server/lib/jobs/activitypub-http-job-scheduler')
-rw-r--r-- | server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts b/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts index 76da5b724..95a5d3ff2 100644 --- a/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts +++ b/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { JobCategory } from '../../../../shared' | 1 | import { JobCategory } from '../../../../shared' |
2 | import { buildSignedActivity, logger } from '../../../helpers' | 2 | import { buildSignedActivity, logger } from '../../../helpers' |
3 | import { ACTIVITY_PUB } from '../../../initializers' | 3 | import { ACTIVITY_PUB } from '../../../initializers' |
4 | import { AccountModel } from '../../../models/account/account' | 4 | import { ActorModel } from '../../../models/activitypub/actor' |
5 | import { JobHandler, JobScheduler } from '../job-scheduler' | 5 | import { JobHandler, JobScheduler } from '../job-scheduler' |
6 | 6 | ||
7 | import * as activitypubHttpBroadcastHandler from './activitypub-http-broadcast-handler' | 7 | import * as activitypubHttpBroadcastHandler from './activitypub-http-broadcast-handler' |
@@ -10,7 +10,7 @@ import * as activitypubHttpUnicastHandler from './activitypub-http-unicast-handl | |||
10 | 10 | ||
11 | type ActivityPubHttpPayload = { | 11 | type ActivityPubHttpPayload = { |
12 | uris: string[] | 12 | uris: string[] |
13 | signatureAccountId?: number | 13 | signatureActorId?: number |
14 | body?: any | 14 | body?: any |
15 | attemptNumber?: number | 15 | attemptNumber?: number |
16 | } | 16 | } |
@@ -44,10 +44,10 @@ function maybeRetryRequestLater (err: Error, payload: ActivityPubHttpPayload, ur | |||
44 | async function computeBody (payload: ActivityPubHttpPayload) { | 44 | async function computeBody (payload: ActivityPubHttpPayload) { |
45 | let body = payload.body | 45 | let body = payload.body |
46 | 46 | ||
47 | if (payload.signatureAccountId) { | 47 | if (payload.signatureActorId) { |
48 | const accountSignature = await AccountModel.load(payload.signatureAccountId) | 48 | const actorSignature = await ActorModel.load(payload.signatureActorId) |
49 | if (!accountSignature) throw new Error('Unknown signature account id.') | 49 | if (!actorSignature) throw new Error('Unknown signature account id.') |
50 | body = await buildSignedActivity(accountSignature, payload.body) | 50 | body = await buildSignedActivity(actorSignature, payload.body) |
51 | } | 51 | } |
52 | 52 | ||
53 | return body | 53 | return body |