aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/activitypub.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-15 11:14:12 +0100
committerChocobozzz <me@florianbigard.com>2019-01-15 14:45:09 +0100
commit848f499def54db2dd36437ef0dfb74dd5041c23b (patch)
tree13e6fcd30e3ce5306d5999fc91561af54d9fd20e /server/helpers/activitypub.ts
parent44b9c0ba31c4a97e3d874f33226ad935c3a90dd5 (diff)
downloadPeerTube-848f499def54db2dd36437ef0dfb74dd5041c23b.tar.gz
PeerTube-848f499def54db2dd36437ef0dfb74dd5041c23b.tar.zst
PeerTube-848f499def54db2dd36437ef0dfb74dd5041c23b.zip
Prepare Dislike/Flag/View fixes
For now we Create these activities, but we should just send them directly. This fix handles correctly direct Dislikes/Flags/Views, we'll implement the sending correctly these activities in the next peertube version
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r--server/helpers/activitypub.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts
index 79b76fa0b..f1430055f 100644
--- a/server/helpers/activitypub.ts
+++ b/server/helpers/activitypub.ts
@@ -106,7 +106,7 @@ function buildSignedActivity (byActor: ActorModel, data: Object) {
106 return signJsonLDObject(byActor, activity) as Promise<Activity> 106 return signJsonLDObject(byActor, activity) as Promise<Activity>
107} 107}
108 108
109function getAPUrl (activity: string | { id: string }) { 109function getAPId (activity: string | { id: string }) {
110 if (typeof activity === 'string') return activity 110 if (typeof activity === 'string') return activity
111 111
112 return activity.id 112 return activity.id
@@ -123,7 +123,7 @@ function checkUrlsSameHost (url1: string, url2: string) {
123 123
124export { 124export {
125 checkUrlsSameHost, 125 checkUrlsSameHost,
126 getAPUrl, 126 getAPId,
127 activityPubContextify, 127 activityPubContextify,
128 activityPubCollectionPagination, 128 activityPubCollectionPagination,
129 buildSignedActivity 129 buildSignedActivity