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:
parent
11a554cfcf
commit
a2f99b54df
4 changed files with 13 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue