diff options
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 | }) |