aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/activitypub.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-16 16:25:53 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-18 13:38:09 +0100
commit90a8bd305de4153ec21137a73ff482dcc2e3e19b (patch)
tree2e35b5504ec11bc51579c92a70c77ed3d5ace816 /server/helpers/activitypub.ts
parent684cdacbbd775b5f404dd7b373e02dd21baf5ff0 (diff)
downloadPeerTube-90a8bd305de4153ec21137a73ff482dcc2e3e19b.tar.gz
PeerTube-90a8bd305de4153ec21137a73ff482dcc2e3e19b.tar.zst
PeerTube-90a8bd305de4153ec21137a73ff482dcc2e3e19b.zip
Dissociate video file names and video uuid
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}