aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-05 16:18:57 +0200
committerChocobozzz <me@florianbigard.com>2023-06-29 10:18:00 +0200
commit7f7e9d4e904fed9233f84089e3b2ea60ab8740f7 (patch)
tree7407ae25a483e3e8b43443a6bbdceb067b5db8e5 /server/helpers/custom-validators/activitypub
parentcefe22cf7c5286af1eb0e7a19937e741e2c2f58a (diff)
downloadPeerTube-7f7e9d4e904fed9233f84089e3b2ea60ab8740f7.tar.gz
PeerTube-7f7e9d4e904fed9233f84089e3b2ea60ab8740f7.tar.zst
PeerTube-7f7e9d4e904fed9233f84089e3b2ea60ab8740f7.zip
Handle correctly formatted AP attributedTo
Diffstat (limited to 'server/helpers/custom-validators/activitypub')
-rw-r--r--server/helpers/custom-validators/activitypub/misc.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts
index 279ad83dc..7df47cf15 100644
--- a/server/helpers/custom-validators/activitypub/misc.ts
+++ b/server/helpers/custom-validators/activitypub/misc.ts
@@ -51,7 +51,8 @@ function setValidAttributedTo (obj: any) {
51 } 51 }
52 52
53 obj.attributedTo = obj.attributedTo.filter(a => { 53 obj.attributedTo = obj.attributedTo.filter(a => {
54 return (a.type === 'Group' || a.type === 'Person') && isActivityPubUrlValid(a.id) 54 return isActivityPubUrlValid(a) ||
55 ((a.type === 'Group' || a.type === 'Person') && isActivityPubUrlValid(a.id))
55 }) 56 })
56 57
57 return true 58 return true