aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-04 09:52:45 +0200
committerChocobozzz <me@florianbigard.com>2018-04-04 09:59:31 +0200
commit20760d9160e09bb4efaddffb331395f8d6c3c59d (patch)
tree113685a8e9577b200dd75cea2ee9efbbd2847672 /server/helpers/custom-validators
parent317ebb939e78af5865f032d3b09289d23b82ce12 (diff)
downloadPeerTube-20760d9160e09bb4efaddffb331395f8d6c3c59d.tar.gz
PeerTube-20760d9160e09bb4efaddffb331395f8d6c3c59d.tar.zst
PeerTube-20760d9160e09bb4efaddffb331395f8d6c3c59d.zip
Accept unlisted comments too
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) {