diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-20 09:43:39 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 54141398354e6e7b94aa3065a705a1251390111c (patch) | |
tree | 8d30d1b9ea8acbe04f6d404125b04fc0c9897b70 /server/controllers/activitypub | |
parent | eb8b27c93e61a896a08923dc1ca3c87ba8cf4948 (diff) | |
download | PeerTube-54141398354e6e7b94aa3065a705a1251390111c.tar.gz PeerTube-54141398354e6e7b94aa3065a705a1251390111c.tar.zst PeerTube-54141398354e6e7b94aa3065a705a1251390111c.zip |
Refractor activity pub lib/helpers
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r-- | server/controllers/activitypub/inbox.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/server/controllers/activitypub/inbox.ts b/server/controllers/activitypub/inbox.ts index fd3695886..807d0bdf4 100644 --- a/server/controllers/activitypub/inbox.ts +++ b/server/controllers/activitypub/inbox.ts | |||
@@ -2,12 +2,12 @@ import * as express from 'express' | |||
2 | import { Activity, ActivityPubCollection, ActivityPubOrderedCollection, ActivityType, RootActivity } from '../../../shared' | 2 | import { Activity, ActivityPubCollection, ActivityPubOrderedCollection, ActivityType, RootActivity } from '../../../shared' |
3 | import { logger } from '../../helpers' | 3 | import { logger } from '../../helpers' |
4 | import { isActivityValid } from '../../helpers/custom-validators/activitypub/activity' | 4 | import { isActivityValid } from '../../helpers/custom-validators/activitypub/activity' |
5 | import { processCreateActivity, processUpdateActivity } from '../../lib' | 5 | import { processCreateActivity, processUpdateActivity, processUndoActivity } from '../../lib' |
6 | import { processAcceptActivity } from '../../lib/activitypub/process-accept' | 6 | import { processAcceptActivity } from '../../lib/activitypub/process/process-accept' |
7 | import { processAddActivity } from '../../lib/activitypub/process-add' | 7 | import { processAddActivity } from '../../lib/activitypub/process/process-add' |
8 | import { processAnnounceActivity } from '../../lib/activitypub/process-announce' | 8 | import { processAnnounceActivity } from '../../lib/activitypub/process/process-announce' |
9 | import { processDeleteActivity } from '../../lib/activitypub/process-delete' | 9 | import { processDeleteActivity } from '../../lib/activitypub/process/process-delete' |
10 | import { processFollowActivity } from '../../lib/activitypub/process-follow' | 10 | import { processFollowActivity } from '../../lib/activitypub/process/process-follow' |
11 | import { asyncMiddleware, checkSignature, localAccountValidator, signatureValidator } from '../../middlewares' | 11 | import { asyncMiddleware, checkSignature, localAccountValidator, signatureValidator } from '../../middlewares' |
12 | import { activityPubValidator } from '../../middlewares/validators/activitypub/activity' | 12 | import { activityPubValidator } from '../../middlewares/validators/activitypub/activity' |
13 | import { AccountInstance } from '../../models/account/account-interface' | 13 | import { AccountInstance } from '../../models/account/account-interface' |
@@ -19,7 +19,8 @@ const processActivity: { [ P in ActivityType ]: (activity: Activity, inboxAccoun | |||
19 | Delete: processDeleteActivity, | 19 | Delete: processDeleteActivity, |
20 | Follow: processFollowActivity, | 20 | Follow: processFollowActivity, |
21 | Accept: processAcceptActivity, | 21 | Accept: processAcceptActivity, |
22 | Announce: processAnnounceActivity | 22 | Announce: processAnnounceActivity, |
23 | Undo: processUndoActivity | ||
23 | } | 24 | } |
24 | 25 | ||
25 | const inboxRouter = express.Router() | 26 | const inboxRouter = express.Router() |