diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-19 17:07:58 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-19 17:07:58 +0100 |
commit | d7a7c248b36af5f9cf7375ba62720e4a1530eca6 (patch) | |
tree | 8e50a51ba9196965e775968797326a02fc3302cf /server/helpers | |
parent | 85414add64d2215a44866471913a8470638742e4 (diff) | |
download | PeerTube-d7a7c248b36af5f9cf7375ba62720e4a1530eca6.tar.gz PeerTube-d7a7c248b36af5f9cf7375ba62720e4a1530eca6.tar.zst PeerTube-d7a7c248b36af5f9cf7375ba62720e4a1530eca6.zip |
Handle mastodon shares
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/custom-validators/activitypub/announce.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/activitypub/announce.ts b/server/helpers/custom-validators/activitypub/announce.ts index 80511129c..469ed5127 100644 --- a/server/helpers/custom-validators/activitypub/announce.ts +++ b/server/helpers/custom-validators/activitypub/announce.ts | |||
@@ -1,9 +1,11 @@ | |||
1 | import { isBaseActivityValid } from './misc' | 1 | import { isActivityPubUrlValid, isBaseActivityValid } from './misc' |
2 | import { isVideoTorrentCreateActivityValid } from './videos' | 2 | import { isVideoTorrentCreateActivityValid } from './videos' |
3 | 3 | ||
4 | function isAnnounceActivityValid (activity: any) { | 4 | function isAnnounceActivityValid (activity: any) { |
5 | console.log(activity) | ||
5 | return isBaseActivityValid(activity, 'Announce') && | 6 | return isBaseActivityValid(activity, 'Announce') && |
6 | ( | 7 | ( |
8 | isActivityPubUrlValid(activity.object) || | ||
7 | isVideoTorrentCreateActivityValid(activity.object) | 9 | isVideoTorrentCreateActivityValid(activity.object) |
8 | ) | 10 | ) |
9 | } | 11 | } |