aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/activitypub.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r--server/helpers/activitypub.ts12
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 @@
1import * as Bluebird from 'bluebird' 1import * as Bluebird from 'bluebird'
2import { URL } from 'url'
2import validator from 'validator' 3import validator from 'validator'
4import { ContextType } from '@shared/models/activitypub/context'
3import { ResultList } from '../../shared/models' 5import { ResultList } from '../../shared/models'
4import { Activity } from '../../shared/models/activitypub' 6import { Activity } from '../../shared/models/activitypub'
5import { ACTIVITY_PUB, REMOTE_SCHEME } from '../initializers/constants' 7import { ACTIVITY_PUB, REMOTE_SCHEME } from '../initializers/constants'
6import { signJsonLDObject } from './peertube-crypto' 8import { MActor, MVideoWithHost } from '../types/models'
7import { pageToStartAndCount } from './core-utils' 9import { pageToStartAndCount } from './core-utils'
8import { URL } from 'url' 10import { signJsonLDObject } from './peertube-crypto'
9import { MActor, MVideoAccountLight } from '../types/models'
10import { ContextType } from '@shared/models/activitypub/context'
11 11
12function getContextData (type: ContextType) { 12function 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
204function buildRemoteVideoBaseUrl (video: MVideoAccountLight, path: string) { 204function 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}