diff options
Diffstat (limited to 'server/lib/activitypub/process/process.ts')
-rw-r--r-- | server/lib/activitypub/process/process.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/lib/activitypub/process/process.ts b/server/lib/activitypub/process/process.ts index 5cef75665..02a23d098 100644 --- a/server/lib/activitypub/process/process.ts +++ b/server/lib/activitypub/process/process.ts | |||
@@ -1,22 +1,22 @@ | |||
1 | import { StatsManager } from '@server/lib/stat-manager' | ||
1 | import { Activity, ActivityType } from '../../../../shared/models/activitypub' | 2 | import { Activity, ActivityType } from '../../../../shared/models/activitypub' |
2 | import { checkUrlsSameHost, getAPId } from '../../../helpers/activitypub' | 3 | import { checkUrlsSameHost, getAPId } from '../../../helpers/activitypub' |
3 | import { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
5 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' | ||
6 | import { MActorDefault, MActorSignature } from '../../../types/models' | ||
7 | import { getOrCreateAPActor } from '../actors' | ||
4 | import { processAcceptActivity } from './process-accept' | 8 | import { processAcceptActivity } from './process-accept' |
5 | import { processAnnounceActivity } from './process-announce' | 9 | import { processAnnounceActivity } from './process-announce' |
6 | import { processCreateActivity } from './process-create' | 10 | import { processCreateActivity } from './process-create' |
7 | import { processDeleteActivity } from './process-delete' | 11 | import { processDeleteActivity } from './process-delete' |
12 | import { processDislikeActivity } from './process-dislike' | ||
13 | import { processFlagActivity } from './process-flag' | ||
8 | import { processFollowActivity } from './process-follow' | 14 | import { processFollowActivity } from './process-follow' |
9 | import { processLikeActivity } from './process-like' | 15 | import { processLikeActivity } from './process-like' |
10 | import { processRejectActivity } from './process-reject' | 16 | import { processRejectActivity } from './process-reject' |
11 | import { processUndoActivity } from './process-undo' | 17 | import { processUndoActivity } from './process-undo' |
12 | import { processUpdateActivity } from './process-update' | 18 | import { processUpdateActivity } from './process-update' |
13 | import { getOrCreateActorAndServerAndModel } from '../actor' | ||
14 | import { processDislikeActivity } from './process-dislike' | ||
15 | import { processFlagActivity } from './process-flag' | ||
16 | import { processViewActivity } from './process-view' | 19 | import { processViewActivity } from './process-view' |
17 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' | ||
18 | import { MActorDefault, MActorSignature } from '../../../types/models' | ||
19 | import { StatsManager } from '@server/lib/stat-manager' | ||
20 | 20 | ||
21 | const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = { | 21 | const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = { |
22 | Create: processCreateActivity, | 22 | Create: processCreateActivity, |
@@ -65,7 +65,7 @@ async function processActivities ( | |||
65 | continue | 65 | continue |
66 | } | 66 | } |
67 | 67 | ||
68 | const byActor = signatureActor || actorsCache[actorUrl] || await getOrCreateActorAndServerAndModel(actorUrl) | 68 | const byActor = signatureActor || actorsCache[actorUrl] || await getOrCreateAPActor(actorUrl) |
69 | actorsCache[actorUrl] = byActor | 69 | actorsCache[actorUrl] = byActor |
70 | 70 | ||
71 | const activityProcessor = processActivity[activity.type] | 71 | const activityProcessor = processActivity[activity.type] |