diff options
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r-- | server/helpers/activitypub.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 1188d6cf9..02a9d4026 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -1,13 +1,13 @@ | |||
1 | import * as Bluebird from 'bluebird' | 1 | import * as Bluebird from 'bluebird' |
2 | import { URL } from 'url' | ||
2 | import validator from 'validator' | 3 | import validator from 'validator' |
4 | import { ContextType } from '@shared/models/activitypub/context' | ||
3 | import { ResultList } from '../../shared/models' | 5 | import { ResultList } from '../../shared/models' |
4 | import { Activity } from '../../shared/models/activitypub' | 6 | import { Activity } from '../../shared/models/activitypub' |
5 | import { ACTIVITY_PUB, REMOTE_SCHEME } from '../initializers/constants' | 7 | import { ACTIVITY_PUB, REMOTE_SCHEME } from '../initializers/constants' |
6 | import { signJsonLDObject } from './peertube-crypto' | 8 | import { MActor, MVideoWithHost } from '../types/models' |
7 | import { pageToStartAndCount } from './core-utils' | 9 | import { pageToStartAndCount } from './core-utils' |
8 | import { URL } from 'url' | 10 | import { signJsonLDObject } from './peertube-crypto' |
9 | import { MActor, MVideoAccountLight } from '../types/models' | ||
10 | import { ContextType } from '@shared/models/activitypub/context' | ||
11 | 11 | ||
12 | function getContextData (type: ContextType) { | 12 | function getContextData (type: ContextType) { |
13 | const context: any[] = [ | 13 | const context: any[] = [ |
@@ -201,8 +201,8 @@ function checkUrlsSameHost (url1: string, url2: string) { | |||
201 | return idHost && actorHost && idHost.toLowerCase() === actorHost.toLowerCase() | 201 | return idHost && actorHost && idHost.toLowerCase() === actorHost.toLowerCase() |
202 | } | 202 | } |
203 | 203 | ||
204 | function buildRemoteVideoBaseUrl (video: MVideoAccountLight, path: string) { | 204 | function buildRemoteVideoBaseUrl (video: MVideoWithHost, path: string) { |
205 | const host = video.VideoChannel.Account.Actor.Server.host | 205 | const host = video.VideoChannel.Actor.Server.host |
206 | 206 | ||
207 | return REMOTE_SCHEME.HTTP + '://' + host + path | 207 | return REMOTE_SCHEME.HTTP + '://' + host + path |
208 | } | 208 | } |