diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-16 17:04:19 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 21e0727a84734cb0c81c1c9bb22a49b13e46fe5f (patch) | |
tree | 088da51cadbffe3ac64414b407e161f58b53bde7 /server/helpers/custom-validators | |
parent | d7d5611c8a23de9b483f0437ad3469afef7b8805 (diff) | |
download | PeerTube-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.ts | 7 |
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 | ||
60 | function isVideoFlagValid (activity: any) { | 60 | function 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 | ||
66 | function isAnnounceValid (activity: any) { | 67 | function isAnnounceValid (activity: any) { |