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/video-comments.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/activitypub/video-comments.ts b/server/helpers/custom-validators/activitypub/video-comments.ts
index 079fee434..7e8cfece2 100644
--- a/server/helpers/custom-validators/activitypub/video-comments.ts
+++ b/server/helpers/custom-validators/activitypub/video-comments.ts
@@ -16,7 +16,10 @@ function isVideoCommentObjectValid (comment: any) {
16 isDateValid(comment.published) && 16 isDateValid(comment.published) &&
17 isActivityPubUrlValid(comment.url) && 17 isActivityPubUrlValid(comment.url) &&
18 isArray(comment.to) && 18 isArray(comment.to) &&
19 comment.to.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 // Only accept public comments 19 (
20 comment.to.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 ||
21 comment.cc.indexOf(ACTIVITY_PUB.PUBLIC) !== -1
22 ) // Only accept public comments
20} 23}
21 24
22function isVideoCommentDeleteActivityValid (activity: any) { 25function isVideoCommentDeleteActivityValid (activity: any) {