1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Handle correctly formatted AP attributedTo

This commit is contained in:
Chocobozzz 2023-06-05 16:18:57 +02:00
parent cefe22cf7c
commit 7f7e9d4e90
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 41 additions and 28 deletions

View file

@ -51,7 +51,8 @@ function setValidAttributedTo (obj: any) {
}
obj.attributedTo = obj.attributedTo.filter(a => {
return (a.type === 'Group' || a.type === 'Person') && isActivityPubUrlValid(a.id)
return isActivityPubUrlValid(a) ||
((a.type === 'Group' || a.type === 'Person') && isActivityPubUrlValid(a.id))
})
return true