aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-16 17:04:19 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:52 +0100
commit21e0727a84734cb0c81c1c9bb22a49b13e46fe5f (patch)
tree088da51cadbffe3ac64414b407e161f58b53bde7 /server/helpers/custom-validators
parentd7d5611c8a23de9b483f0437ad3469afef7b8805 (diff)
downloadPeerTube-21e0727a84734cb0c81c1c9bb22a49b13e46fe5f.tar.gz
PeerTube-21e0727a84734cb0c81c1c9bb22a49b13e46fe5f.tar.zst
PeerTube-21e0727a84734cb0c81c1c9bb22a49b13e46fe5f.zip
Federate video abuses
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index 8486297ad..728511e3d 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -58,9 +58,10 @@ function isVideoTorrentObjectValid (video: any) {
58} 58}
59 59
60function isVideoFlagValid (activity: any) { 60function isVideoFlagValid (activity: any) {
61 return isBaseActivityValid(activity, 'Flag') && 61 return isBaseActivityValid(activity, 'Create') &&
62 isVideoAbuseReasonValid(activity.content) && 62 activity.object.type === 'Flag' &&
63 isActivityPubUrlValid(activity.object) 63 isVideoAbuseReasonValid(activity.object.content) &&
64 isActivityPubUrlValid(activity.object.object)
64} 65}
65 66
66function isAnnounceValid (activity: any) { 67function isAnnounceValid (activity: any) {