diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 14:09:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 14:09:23 +0100 |
commit | b718fd22374d64534bcfe69932cf562894abed6a (patch) | |
tree | 311d3c67e2a4d1f33ebdd1dc163527de9d33d0f7 /server/helpers/activitypub.ts | |
parent | adb115f5522bea4d52456a9fc5eb4140bb064476 (diff) | |
parent | 501e961199578129629cf0567033d13efced9904 (diff) | |
download | PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.tar.gz PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.tar.zst PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.zip |
Merge branch 'develop' into pr/1285
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r-- | server/helpers/activitypub.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 79b76fa0b..62d78373e 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -15,7 +15,7 @@ function activityPubContextify <T> (data: T) { | |||
15 | 'https://w3id.org/security/v1', | 15 | 'https://w3id.org/security/v1', |
16 | { | 16 | { |
17 | RsaSignature2017: 'https://w3id.org/security#RsaSignature2017', | 17 | RsaSignature2017: 'https://w3id.org/security#RsaSignature2017', |
18 | pt: 'https://joinpeertube.org/ns', | 18 | pt: 'https://joinpeertube.org/ns#', |
19 | sc: 'http://schema.org#', | 19 | sc: 'http://schema.org#', |
20 | Hashtag: 'as:Hashtag', | 20 | Hashtag: 'as:Hashtag', |
21 | uuid: 'sc:identifier', | 21 | uuid: 'sc:identifier', |
@@ -29,10 +29,12 @@ function activityPubContextify <T> (data: T) { | |||
29 | size: 'sc:Number', | 29 | size: 'sc:Number', |
30 | fps: 'sc:Number', | 30 | fps: 'sc:Number', |
31 | commentsEnabled: 'sc:Boolean', | 31 | commentsEnabled: 'sc:Boolean', |
32 | downloadEnabled: 'sc:Boolean', | ||
32 | waitTranscoding: 'sc:Boolean', | 33 | waitTranscoding: 'sc:Boolean', |
33 | expires: 'sc:expires', | 34 | expires: 'sc:expires', |
34 | support: 'sc:Text', | 35 | support: 'sc:Text', |
35 | CacheFile: 'pt:CacheFile' | 36 | CacheFile: 'pt:CacheFile', |
37 | Infohash: 'pt:Infohash' | ||
36 | }, | 38 | }, |
37 | { | 39 | { |
38 | likes: { | 40 | likes: { |
@@ -106,7 +108,7 @@ function buildSignedActivity (byActor: ActorModel, data: Object) { | |||
106 | return signJsonLDObject(byActor, activity) as Promise<Activity> | 108 | return signJsonLDObject(byActor, activity) as Promise<Activity> |
107 | } | 109 | } |
108 | 110 | ||
109 | function getAPUrl (activity: string | { id: string }) { | 111 | function getAPId (activity: string | { id: string }) { |
110 | if (typeof activity === 'string') return activity | 112 | if (typeof activity === 'string') return activity |
111 | 113 | ||
112 | return activity.id | 114 | return activity.id |
@@ -123,7 +125,7 @@ function checkUrlsSameHost (url1: string, url2: string) { | |||
123 | 125 | ||
124 | export { | 126 | export { |
125 | checkUrlsSameHost, | 127 | checkUrlsSameHost, |
126 | getAPUrl, | 128 | getAPId, |
127 | activityPubContextify, | 129 | activityPubContextify, |
128 | activityPubCollectionPagination, | 130 | activityPubCollectionPagination, |
129 | buildSignedActivity | 131 | buildSignedActivity |