diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-15 15:12:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391 (patch) | |
tree | a59070f4dc6b52a5b422bd31a8eb8ea3bff831a0 /server/helpers/activitypub.ts | |
parent | 59c857da5961e2bcddcfd07832783c1e4afcd01a (diff) | |
download | PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.tar.gz PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.tar.zst PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.zip |
Add video abuse to activity pub
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r-- | server/helpers/activitypub.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 3e77e0581..de20ba55d 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -22,10 +22,11 @@ function generateThumbnailFromUrl (video: VideoInstance, icon: ActivityIconObjec | |||
22 | return doRequestAndSaveToFile(options, thumbnailPath) | 22 | return doRequestAndSaveToFile(options, thumbnailPath) |
23 | } | 23 | } |
24 | 24 | ||
25 | function getActivityPubUrl (type: 'video' | 'videoChannel' | 'account', id: string) { | 25 | function getActivityPubUrl (type: 'video' | 'videoChannel' | 'account' | 'videoAbuse', id: string) { |
26 | if (type === 'video') return CONFIG.WEBSERVER.URL + '/videos/watch/' + id | 26 | if (type === 'video') return CONFIG.WEBSERVER.URL + '/videos/watch/' + id |
27 | else if (type === 'videoChannel') return CONFIG.WEBSERVER.URL + '/video-channels/' + id | 27 | else if (type === 'videoChannel') return CONFIG.WEBSERVER.URL + '/video-channels/' + id |
28 | else if (type === 'account') return CONFIG.WEBSERVER.URL + '/account/' + id | 28 | else if (type === 'account') return CONFIG.WEBSERVER.URL + '/account/' + id |
29 | else if (type === 'videoAbuse') return CONFIG.WEBSERVER.URL + '/admin/video-abuses/' + id | ||
29 | 30 | ||
30 | return '' | 31 | return '' |
31 | } | 32 | } |
@@ -134,7 +135,8 @@ function activityPubContextify <T> (data: T) { | |||
134 | 'nsfw': 'as:sensitive', | 135 | 'nsfw': 'as:sensitive', |
135 | 'language': 'http://schema.org/inLanguage', | 136 | 'language': 'http://schema.org/inLanguage', |
136 | 'views': 'http://schema.org/Number', | 137 | 'views': 'http://schema.org/Number', |
137 | 'size': 'http://schema.org/Number' | 138 | 'size': 'http://schema.org/Number', |
139 | 'VideoChannel': 'https://peertu.be/ns/VideoChannel' | ||
138 | } | 140 | } |
139 | ] | 141 | ] |
140 | }) | 142 | }) |