diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-16 16:25:53 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-18 13:38:09 +0100 |
commit | 90a8bd305de4153ec21137a73ff482dcc2e3e19b (patch) | |
tree | 2e35b5504ec11bc51579c92a70c77ed3d5ace816 /server/helpers/activitypub.ts | |
parent | 684cdacbbd775b5f404dd7b373e02dd21baf5ff0 (diff) | |
download | PeerTube-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.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 | } |