aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-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