diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/custom-validators/activitypub/announce.ts | 5 |
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 @@ | |||
1 | import { isActivityPubUrlValid, isBaseActivityValid } from './misc' | 1 | import { isActivityPubUrlValid, isBaseActivityValid } from './misc' |
2 | import { isVideoTorrentCreateActivityValid } from './videos' | ||
3 | 2 | ||
4 | function isAnnounceActivityValid (activity: any) { | 3 | function 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 | ||