mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Optimize AP fetch
This commit is contained in:
parent
11a554cfcf
commit
a2f99b54df
4 changed files with 13 additions and 5 deletions
|
@ -60,11 +60,12 @@ function isActorDeleteActivityValid (activity: any) {
|
|||
}
|
||||
|
||||
function sanitizeAndCheckActorObject (actor: any) {
|
||||
if (!isActorTypeValid(actor.type)) return false
|
||||
|
||||
normalizeActor(actor)
|
||||
|
||||
return exists(actor) &&
|
||||
isActivityPubUrlValid(actor.id) &&
|
||||
isActorTypeValid(actor.type) &&
|
||||
isActivityPubUrlValid(actor.inbox) &&
|
||||
isActorPreferredUsernameValid(actor.preferredUsername) &&
|
||||
isActivityPubUrlValid(actor.url) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue