From: Chocobozzz Date: Wed, 4 Apr 2018 07:52:45 +0000 (+0200) Subject: Accept unlisted comments too X-Git-Tag: v1.0.0-beta.4~85 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=20760d9160e09bb4efaddffb331395f8d6c3c59d;p=oweals%2Fpeertube.git Accept unlisted comments too --- 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) {