aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/activitypub/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-03 14:10:54 +0100
committerChocobozzz <me@florianbigard.com>2020-12-03 15:21:16 +0100
commitbb4ba6d94c5051fdd665ebe63fffcc105778b8be (patch)
treed39302608c53e31395683bb5dd551eac6ced89f8 /server/helpers/custom-validators/activitypub/videos.ts
parent19b7ebfaa822b12f6da25ad2ba10398b3ef25ec6 (diff)
downloadPeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.tar.gz
PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.tar.zst
PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.zip
Add permanent live support
Diffstat (limited to 'server/helpers/custom-validators/activitypub/videos.ts')
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index cb385b07d..a01429c83 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -64,6 +64,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
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 if (!isBooleanValid(video.liveSaveReplay)) video.liveSaveReplay = false
67 if (!isBooleanValid(video.permanentLive)) video.permanentLive = false
67 68
68 return isActivityPubUrlValid(video.id) && 69 return isActivityPubUrlValid(video.id) &&
69 isVideoNameValid(video.name) && 70 isVideoNameValid(video.name) &&
@@ -74,8 +75,6 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
74 (!video.language || isRemoteStringIdentifierValid(video.language)) && 75 (!video.language || isRemoteStringIdentifierValid(video.language)) &&
75 isVideoViewsValid(video.views) && 76 isVideoViewsValid(video.views) &&
76 isBooleanValid(video.sensitive) && 77 isBooleanValid(video.sensitive) &&
77 isBooleanValid(video.commentsEnabled) &&
78 isBooleanValid(video.downloadEnabled) &&
79 isDateValid(video.published) && 78 isDateValid(video.published) &&
80 isDateValid(video.updated) && 79 isDateValid(video.updated) &&
81 (!video.originallyPublishedAt || isDateValid(video.originallyPublishedAt)) && 80 (!video.originallyPublishedAt || isDateValid(video.originallyPublishedAt)) &&