aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-26 12:02:18 +0100
committerChocobozzz <me@florianbigard.com>2018-01-26 13:43:34 +0100
commit7acee6f18aac99e359360fc4f2362d5405135a79 (patch)
treea8eceaba9a01b913fcfca32f17f26b4f588a633e /server/helpers/custom-validators
parentd6e99e5322209a692cc3d870ddb5dcedbda69f2a (diff)
downloadPeerTube-7acee6f18aac99e359360fc4f2362d5405135a79.tar.gz
PeerTube-7acee6f18aac99e359360fc4f2362d5405135a79.tar.zst
PeerTube-7acee6f18aac99e359360fc4f2362d5405135a79.zip
Fix announce activities
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/activitypub/announce.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/helpers/custom-validators/activitypub/announce.ts b/server/helpers/custom-validators/activitypub/announce.ts
index 7dd1d6988..0519c6026 100644
--- a/server/helpers/custom-validators/activitypub/announce.ts
+++ b/server/helpers/custom-validators/activitypub/announce.ts
@@ -1,11 +1,10 @@
1import { isActivityPubUrlValid, isBaseActivityValid } from './misc' 1import { isActivityPubUrlValid, isBaseActivityValid } from './misc'
2import { isVideoTorrentCreateActivityValid } from './videos'
3 2
4function isAnnounceActivityValid (activity: any) { 3function isAnnounceActivityValid (activity: any) {
5 return isBaseActivityValid(activity, 'Announce') && 4 return isBaseActivityValid(activity, 'Announce') &&
6 ( 5 (
7 isVideoTorrentCreateActivityValid(activity.object) || 6 isActivityPubUrlValid(activity.object) ||
8 isActivityPubUrlValid(activity.object) 7 (activity.object && isActivityPubUrlValid(activity.object.id))
9 ) 8 )
10} 9}
11 10