diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-26 12:02:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-26 13:43:34 +0100 |
commit | 7acee6f18aac99e359360fc4f2362d5405135a79 (patch) | |
tree | a8eceaba9a01b913fcfca32f17f26b4f588a633e /server/helpers/custom-validators | |
parent | d6e99e5322209a692cc3d870ddb5dcedbda69f2a (diff) | |
download | PeerTube-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.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 | ||