aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/videos.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index 2944cb729..b6f57e0ab 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -38,7 +38,7 @@ async function federateVideoIfNeeded (video: VideoModel, isNewVideo: boolean, tr
38 }) as VideoCaptionModel[] 38 }) as VideoCaptionModel[]
39 } 39 }
40 40
41 if (isNewVideo === true) { 41 if (isNewVideo) {
42 // Now we'll add the video's meta data to our followers 42 // Now we'll add the video's meta data to our followers
43 await sendCreateVideo(video, transaction) 43 await sendCreateVideo(video, transaction)
44 await shareVideoByServerAndChannel(video, transaction) 44 await shareVideoByServerAndChannel(video, transaction)
@@ -153,9 +153,7 @@ function videoFileActivityUrlToDBAttributes (videoCreated: VideoModel, videoObje
153 if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.href) 153 if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.href)
154 154
155 const parsed = magnetUtil.decode(magnet.href) 155 const parsed = magnetUtil.decode(magnet.href)
156 if (!parsed || 156 if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) {
157 (parsed.infoHash &&
158 (isVideoFileInfoHashValid(parsed.infoHash) === false))) {
159 throw new Error('Cannot parse magnet URI ' + magnet.href) 157 throw new Error('Cannot parse magnet URI ' + magnet.href)
160 } 158 }
161 159