1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Optimize AP fetch

This commit is contained in:
Chocobozzz 2021-11-16 10:05:12 +01:00
parent 11a554cfcf
commit a2f99b54df
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 13 additions and 5 deletions

View file

@ -187,10 +187,10 @@ function buildSignedActivity <T> (byActor: MActor, data: T, contextType?: Contex
return signJsonLDObject(byActor, activity)
}
function getAPId (activity: string | { id: string }) {
if (typeof activity === 'string') return activity
function getAPId (object: string | { id: string }) {
if (typeof object === 'string') return object
return activity.id
return object.id
}
function checkUrlsSameHost (url1: string, url2: string) {