diff options
Diffstat (limited to 'server/lib/activitypub/process/process.ts')
-rw-r--r-- | server/lib/activitypub/process/process.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/activitypub/process/process.ts b/server/lib/activitypub/process/process.ts index f4a92e341..d108fe321 100644 --- a/server/lib/activitypub/process/process.ts +++ b/server/lib/activitypub/process/process.ts | |||
@@ -16,6 +16,7 @@ import { processDislikeActivity } from './process-dislike' | |||
16 | import { processFlagActivity } from './process-flag' | 16 | import { processFlagActivity } from './process-flag' |
17 | import { processViewActivity } from './process-view' | 17 | import { processViewActivity } from './process-view' |
18 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 18 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' |
19 | import { SignatureActorModel } from '../../../typings/models' | ||
19 | 20 | ||
20 | const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = { | 21 | const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = { |
21 | Create: processCreateActivity, | 22 | Create: processCreateActivity, |
@@ -35,7 +36,7 @@ const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Act | |||
35 | async function processActivities ( | 36 | async function processActivities ( |
36 | activities: Activity[], | 37 | activities: Activity[], |
37 | options: { | 38 | options: { |
38 | signatureActor?: ActorModel | 39 | signatureActor?: SignatureActorModel |
39 | inboxActor?: ActorModel | 40 | inboxActor?: ActorModel |
40 | outboxUrl?: string | 41 | outboxUrl?: string |
41 | fromFetch?: boolean | 42 | fromFetch?: boolean |
@@ -43,7 +44,7 @@ async function processActivities ( | |||
43 | ) { | 44 | ) { |
44 | const { outboxUrl, signatureActor, inboxActor, fromFetch = false } = options | 45 | const { outboxUrl, signatureActor, inboxActor, fromFetch = false } = options |
45 | 46 | ||
46 | const actorsCache: { [ url: string ]: ActorModel } = {} | 47 | const actorsCache: { [ url: string ]: SignatureActorModel } = {} |
47 | 48 | ||
48 | for (const activity of activities) { | 49 | for (const activity of activities) { |
49 | if (!signatureActor && [ 'Create', 'Announce', 'Like' ].includes(activity.type) === false) { | 50 | if (!signatureActor && [ 'Create', 'Announce', 'Like' ].includes(activity.type) === false) { |