aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/activitypub.ts3
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts1
2 files changed, 3 insertions, 1 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts
index 62d78373e..e850efe13 100644
--- a/server/helpers/activitypub.ts
+++ b/server/helpers/activitypub.ts
@@ -34,7 +34,8 @@ function activityPubContextify <T> (data: T) {
34 expires: 'sc:expires', 34 expires: 'sc:expires',
35 support: 'sc:Text', 35 support: 'sc:Text',
36 CacheFile: 'pt:CacheFile', 36 CacheFile: 'pt:CacheFile',
37 Infohash: 'pt:Infohash' 37 Infohash: 'pt:Infohash',
38 originallyPublishedAt: 'sc:DateTime'
38 }, 39 },
39 { 40 {
40 likes: { 41 likes: {
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 &&