From 20760d9160e09bb4efaddffb331395f8d6c3c59d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 4 Apr 2018 09:52:45 +0200 Subject: [PATCH] Accept unlisted comments too --- .../helpers/custom-validators/activitypub/video-comments.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { isDateValid(comment.published) && isActivityPubUrlValid(comment.url) && isArray(comment.to) && - comment.to.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 // Only accept public comments + ( + comment.to.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 || + comment.cc.indexOf(ACTIVITY_PUB.PUBLIC) !== -1 + ) // Only accept public comments } function isVideoCommentDeleteActivityValid (activity: any) { -- 2.25.1