aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-11 14:41:55 +0100
committerChocobozzz <me@florianbigard.com>2019-02-11 15:16:39 +0100
commit7519127b5cb44095f78f6bf4c51d4ebf2b7d5e88 (patch)
treeed94c1fb00a85a1f25c15b9a82831f4999e72948 /server/helpers/custom-validators
parent6913f69134947432a192890b2de7c2d48094e85c (diff)
downloadPeerTube-7519127b5cb44095f78f6bf4c51d4ebf2b7d5e88.tar.gz
PeerTube-7519127b5cb44095f78f6bf4c51d4ebf2b7d5e88.tar.zst
PeerTube-7519127b5cb44095f78f6bf4c51d4ebf2b7d5e88.zip
Add originallyPublishedAt unit tests
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index 53ad0588d..d94333151 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -54,6 +54,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
54 isBooleanValid(video.downloadEnabled) && 54 isBooleanValid(video.downloadEnabled) &&
55 isDateValid(video.published) && 55 isDateValid(video.published) &&
56 isDateValid(video.updated) && 56 isDateValid(video.updated) &&
57 (!video.originallyPublishedAt || isDateValid(video.originallyPublishedAt)) &&
57 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) && 58 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) &&
58 isRemoteVideoIconValid(video.icon) && 59 isRemoteVideoIconValid(video.icon) &&
59 video.url.length !== 0 && 60 video.url.length !== 0 &&