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, 1 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index 7ff551ecd..cb385b07d 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -63,6 +63,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
63 if (!isBooleanValid(video.downloadEnabled)) video.downloadEnabled = true 63 if (!isBooleanValid(video.downloadEnabled)) video.downloadEnabled = true
64 if (!isBooleanValid(video.commentsEnabled)) video.commentsEnabled = false 64 if (!isBooleanValid(video.commentsEnabled)) video.commentsEnabled = false
65 if (!isBooleanValid(video.isLiveBroadcast)) video.isLiveBroadcast = false 65 if (!isBooleanValid(video.isLiveBroadcast)) video.isLiveBroadcast = false
66 if (!isBooleanValid(video.liveSaveReplay)) video.liveSaveReplay = false
66 67
67 return isActivityPubUrlValid(video.id) && 68 return isActivityPubUrlValid(video.id) &&
68 isVideoNameValid(video.name) && 69 isVideoNameValid(video.name) &&
@@ -79,7 +80,6 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
79 isDateValid(video.updated) && 80 isDateValid(video.updated) &&
80 (!video.originallyPublishedAt || isDateValid(video.originallyPublishedAt)) && 81 (!video.originallyPublishedAt || isDateValid(video.originallyPublishedAt)) &&
81 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) && 82 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) &&
82 video.url.length !== 0 &&
83 video.attributedTo.length !== 0 83 video.attributedTo.length !== 0
84} 84}
85 85