aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-19 17:07:58 +0100
committerChocobozzz <me@florianbigard.com>2017-12-19 17:07:58 +0100
commitd7a7c248b36af5f9cf7375ba62720e4a1530eca6 (patch)
tree8e50a51ba9196965e775968797326a02fc3302cf /server/helpers
parent85414add64d2215a44866471913a8470638742e4 (diff)
downloadPeerTube-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.ts4
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 @@
1import { isBaseActivityValid } from './misc' 1import { isActivityPubUrlValid, isBaseActivityValid } from './misc'
2import { isVideoTorrentCreateActivityValid } from './videos' 2import { isVideoTorrentCreateActivityValid } from './videos'
3 3
4function isAnnounceActivityValid (activity: any) { 4function 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}