diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-23 14:24:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-03-23 14:24:50 +0100 |
commit | 7e98a7df7d04e19ba67163a86c7b876d78d76839 (patch) | |
tree | 080c9bf63d2b00b43dca94e3c67cdc2a768308fc /server/lib/job-queue/handlers | |
parent | 5302f77d095c2188859ee463128aa59eec20ea88 (diff) | |
download | PeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.tar.gz PeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.tar.zst PeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.zip |
Remove activitypub helper
Put functions in lib/activitypub instead
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r-- | server/lib/job-queue/handlers/activitypub-cleaner.ts | 2 | ||||
-rw-r--r-- | server/lib/job-queue/handlers/utils/activitypub-http-utils.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/job-queue/handlers/activitypub-cleaner.ts b/server/lib/job-queue/handlers/activitypub-cleaner.ts index 07dd908cd..123aeac03 100644 --- a/server/lib/job-queue/handlers/activitypub-cleaner.ts +++ b/server/lib/job-queue/handlers/activitypub-cleaner.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import { map } from 'bluebird' | 1 | import { map } from 'bluebird' |
2 | import { Job } from 'bull' | 2 | import { Job } from 'bull' |
3 | import { checkUrlsSameHost } from '@server/helpers/activitypub' | ||
4 | import { | 3 | import { |
5 | isAnnounceActivityValid, | 4 | isAnnounceActivityValid, |
6 | isDislikeActivityValid, | 5 | isDislikeActivityValid, |
@@ -9,6 +8,7 @@ import { | |||
9 | import { sanitizeAndCheckVideoCommentObject } from '@server/helpers/custom-validators/activitypub/video-comments' | 8 | import { sanitizeAndCheckVideoCommentObject } from '@server/helpers/custom-validators/activitypub/video-comments' |
10 | import { doJSONRequest, PeerTubeRequestError } from '@server/helpers/requests' | 9 | import { doJSONRequest, PeerTubeRequestError } from '@server/helpers/requests' |
11 | import { AP_CLEANER } from '@server/initializers/constants' | 10 | import { AP_CLEANER } from '@server/initializers/constants' |
11 | import { checkUrlsSameHost } from '@server/lib/activitypub/url' | ||
12 | import { Redis } from '@server/lib/redis' | 12 | import { Redis } from '@server/lib/redis' |
13 | import { VideoModel } from '@server/models/video/video' | 13 | import { VideoModel } from '@server/models/video/video' |
14 | import { VideoCommentModel } from '@server/models/video/video-comment' | 14 | import { VideoCommentModel } from '@server/models/video/video-comment' |
diff --git a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts index 37e7c1fad..2a03325b7 100644 --- a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts +++ b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { buildDigest } from '@server/helpers/peertube-crypto' | 1 | import { buildDigest } from '@server/helpers/peertube-crypto' |
2 | import { buildSignedActivity } from '@server/lib/activitypub/activity' | ||
2 | import { getServerActor } from '@server/models/application/application' | 3 | import { getServerActor } from '@server/models/application/application' |
3 | import { ContextType } from '@shared/models/activitypub/context' | 4 | import { ContextType } from '@shared/models/activitypub/context' |
4 | import { buildSignedActivity } from '../../../../helpers/activitypub' | ||
5 | import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants' | 5 | import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants' |
6 | import { ActorModel } from '../../../../models/actor/actor' | 6 | import { ActorModel } from '../../../../models/actor/actor' |
7 | import { MActor } from '../../../../types/models' | 7 | import { MActor } from '../../../../types/models' |