aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/actors
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-23 14:24:50 +0100
committerChocobozzz <me@florianbigard.com>2022-03-23 14:24:50 +0100
commit7e98a7df7d04e19ba67163a86c7b876d78d76839 (patch)
tree080c9bf63d2b00b43dca94e3c67cdc2a768308fc /server/lib/activitypub/actors
parent5302f77d095c2188859ee463128aa59eec20ea88 (diff)
downloadPeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.tar.gz
PeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.tar.zst
PeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.zip
Remove activitypub helper
Put functions in lib/activitypub instead
Diffstat (limited to 'server/lib/activitypub/actors')
-rw-r--r--server/lib/activitypub/actors/get.ts4
-rw-r--r--server/lib/activitypub/actors/shared/url-to-object.ts3
2 files changed, 3 insertions, 4 deletions
diff --git a/server/lib/activitypub/actors/get.ts b/server/lib/activitypub/actors/get.ts
index 4200ddb4d..d2b651082 100644
--- a/server/lib/activitypub/actors/get.ts
+++ b/server/lib/activitypub/actors/get.ts
@@ -1,11 +1,11 @@
1
2import { checkUrlsSameHost, getAPId } from '@server/helpers/activitypub'
3import { retryTransactionWrapper } from '@server/helpers/database-utils' 1import { retryTransactionWrapper } from '@server/helpers/database-utils'
4import { logger } from '@server/helpers/logger' 2import { logger } from '@server/helpers/logger'
5import { JobQueue } from '@server/lib/job-queue' 3import { JobQueue } from '@server/lib/job-queue'
6import { ActorLoadByUrlType, loadActorByUrl } from '@server/lib/model-loaders' 4import { ActorLoadByUrlType, loadActorByUrl } from '@server/lib/model-loaders'
7import { MActor, MActorAccountChannelId, MActorAccountChannelIdActor, MActorAccountId, MActorFullActor } from '@server/types/models' 5import { MActor, MActorAccountChannelId, MActorAccountChannelIdActor, MActorAccountId, MActorFullActor } from '@server/types/models'
8import { ActivityPubActor } from '@shared/models' 6import { ActivityPubActor } from '@shared/models'
7import { getAPId } from '../activity'
8import { checkUrlsSameHost } from '../url'
9import { refreshActorIfNeeded } from './refresh' 9import { refreshActorIfNeeded } from './refresh'
10import { APActorCreator, fetchRemoteActor } from './shared' 10import { APActorCreator, fetchRemoteActor } from './shared'
11 11
diff --git a/server/lib/activitypub/actors/shared/url-to-object.ts b/server/lib/activitypub/actors/shared/url-to-object.ts
index f4f16b044..982d52b79 100644
--- a/server/lib/activitypub/actors/shared/url-to-object.ts
+++ b/server/lib/activitypub/actors/shared/url-to-object.ts
@@ -1,9 +1,8 @@
1
2import { checkUrlsSameHost } from '@server/helpers/activitypub'
3import { sanitizeAndCheckActorObject } from '@server/helpers/custom-validators/activitypub/actor' 1import { sanitizeAndCheckActorObject } from '@server/helpers/custom-validators/activitypub/actor'
4import { logger } from '@server/helpers/logger' 2import { logger } from '@server/helpers/logger'
5import { doJSONRequest } from '@server/helpers/requests' 3import { doJSONRequest } from '@server/helpers/requests'
6import { ActivityPubActor, ActivityPubOrderedCollection } from '@shared/models' 4import { ActivityPubActor, ActivityPubOrderedCollection } from '@shared/models'
5import { checkUrlsSameHost } from '../../url'
7 6
8async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode: number, actorObject: ActivityPubActor }> { 7async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode: number, actorObject: ActivityPubActor }> {
9 logger.info('Fetching remote actor %s.', actorUrl) 8 logger.info('Fetching remote actor %s.', actorUrl)