diff options
author | Chocobozzz <me@florianbigard.com> | 2023-06-05 16:18:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-06-29 10:18:00 +0200 |
commit | 7f7e9d4e904fed9233f84089e3b2ea60ab8740f7 (patch) | |
tree | 7407ae25a483e3e8b43443a6bbdceb067b5db8e5 /server/helpers/custom-validators/activitypub | |
parent | cefe22cf7c5286af1eb0e7a19937e741e2c2f58a (diff) | |
download | PeerTube-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.ts | 3 |
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 |