diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-16 10:05:12 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-16 10:28:31 +0100 |
commit | a2f99b54dfdfe489e14714681189cb13c89f60a3 (patch) | |
tree | c8c06b8ebd9bd35e709882cf7cf535b11e53d481 /server/helpers/activitypub.ts | |
parent | 11a554cfcf96dab55681001976a553ff8e3d9dcf (diff) | |
download | PeerTube-a2f99b54dfdfe489e14714681189cb13c89f60a3.tar.gz PeerTube-a2f99b54dfdfe489e14714681189cb13c89f60a3.tar.zst PeerTube-a2f99b54dfdfe489e14714681189cb13c89f60a3.zip |
Optimize AP fetch
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r-- | server/helpers/activitypub.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 8b56d2d50..fe721cbac 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -187,10 +187,10 @@ function buildSignedActivity <T> (byActor: MActor, data: T, contextType?: Contex | |||
187 | return signJsonLDObject(byActor, activity) | 187 | return signJsonLDObject(byActor, activity) |
188 | } | 188 | } |
189 | 189 | ||
190 | function getAPId (activity: string | { id: string }) { | 190 | function getAPId (object: string | { id: string }) { |
191 | if (typeof activity === 'string') return activity | 191 | if (typeof object === 'string') return object |
192 | 192 | ||
193 | return activity.id | 193 | return object.id |
194 | } | 194 | } |
195 | 195 | ||
196 | function checkUrlsSameHost (url1: string, url2: string) { | 196 | function checkUrlsSameHost (url1: string, url2: string) { |