From fbdcdd9dbc379de69e1315c9eceedce4a36b4d64 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 24 Aug 2023 23:36:50 -0600 Subject: [PATCH] Update AP Helpers, consume actor `indexable` attribute --- app/Util/ActivityPub/Helpers.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index 7f47a8fe..c933820a 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -276,7 +276,7 @@ class Helpers { } if(is_array($val)) { - return !empty($val) ? $val[0] : null; + return !empty($val) ? head($val) : null; } return null; @@ -785,6 +785,7 @@ class Helpers { 'inbox_url' => $res['inbox'], 'outbox_url' => isset($res['outbox']) ? $res['outbox'] : null, 'public_key' => $res['publicKey']['publicKeyPem'], + 'indexable' => isset($res['indexable']) && is_bool($res['indexable']) ? $res['indexable'] : false, ] );