diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-20 11:21:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-20 11:21:08 +0100 |
commit | de94ac86a211dec657332d964693857ec235ce40 (patch) | |
tree | 3bff96a40e7c862d83561a26249992b07331b0a2 /server/controllers/api/videos/index.ts | |
parent | 3fba4b6bce69247b1d37f923894d8f44818a891c (diff) | |
download | PeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.gz PeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.zst PeerTube-de94ac86a211dec657332d964693857ec235ce40.zip |
Fix incorrect IDs in AP federation
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r-- | server/controllers/api/videos/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index bfebc54ed..b5ff2e72e 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -5,7 +5,7 @@ import toInt from 'validator/lib/toInt' | |||
5 | import { addOptimizeOrMergeAudioJob } from '@server/helpers/video' | 5 | import { addOptimizeOrMergeAudioJob } from '@server/helpers/video' |
6 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 6 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' |
7 | import { changeVideoChannelShare } from '@server/lib/activitypub/share' | 7 | import { changeVideoChannelShare } from '@server/lib/activitypub/share' |
8 | import { getVideoActivityPubUrl } from '@server/lib/activitypub/url' | 8 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' |
9 | import { LiveManager } from '@server/lib/live-manager' | 9 | import { LiveManager } from '@server/lib/live-manager' |
10 | import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' | 10 | import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' |
11 | import { getVideoFilePath } from '@server/lib/video-paths' | 11 | import { getVideoFilePath } from '@server/lib/video-paths' |
@@ -189,7 +189,7 @@ async function addVideo (req: express.Request, res: express.Response) { | |||
189 | videoData.duration = videoPhysicalFile['duration'] // duration was added by a previous middleware | 189 | videoData.duration = videoPhysicalFile['duration'] // duration was added by a previous middleware |
190 | 190 | ||
191 | const video = new VideoModel(videoData) as MVideoFullLight | 191 | const video = new VideoModel(videoData) as MVideoFullLight |
192 | video.url = getVideoActivityPubUrl(video) // We use the UUID, so set the URL after building the object | 192 | video.url = getLocalVideoActivityPubUrl(video) // We use the UUID, so set the URL after building the object |
193 | 193 | ||
194 | const videoFile = new VideoFileModel({ | 194 | const videoFile = new VideoFileModel({ |
195 | extname: extname(videoPhysicalFile.filename), | 195 | extname: extname(videoPhysicalFile.filename), |