aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index ad99c2724..53ad0588d 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -39,6 +39,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
39 // Default attributes 39 // Default attributes
40 if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED 40 if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED
41 if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false 41 if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false
42 if (!isBooleanValid(video.downloadEnabled)) video.downloadEnabled = true
42 43
43 return isActivityPubUrlValid(video.id) && 44 return isActivityPubUrlValid(video.id) &&
44 isVideoNameValid(video.name) && 45 isVideoNameValid(video.name) &&
@@ -50,6 +51,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
50 isVideoViewsValid(video.views) && 51 isVideoViewsValid(video.views) &&
51 isBooleanValid(video.sensitive) && 52 isBooleanValid(video.sensitive) &&
52 isBooleanValid(video.commentsEnabled) && 53 isBooleanValid(video.commentsEnabled) &&
54 isBooleanValid(video.downloadEnabled) &&
53 isDateValid(video.published) && 55 isDateValid(video.published) &&
54 isDateValid(video.updated) && 56 isDateValid(video.updated) &&
55 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) && 57 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) &&