From 631c0913af8d58313fed3902606665463cddea0b Mon Sep 17 00:00:00 2001 From: Grant Date: Mon, 19 Jan 2026 14:17:40 -0700 Subject: [PATCH] Allow activities 'to' and 'cc' to be solo values in accordance with json-ld spec --- app/Util/ActivityPub/Inbox.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index 3f26a2d79..7fd407e58 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -252,6 +252,10 @@ class Inbox $to = isset($activity['to']) ? $activity['to'] : []; $cc = isset($activity['cc']) ? $activity['cc'] : []; + // JSON-LD allows for arrays with one element to be represented with just the value alone + if (is_string($to)) $to = [$to]; + if (is_string($cc)) $cc = [$cc]; + if ($activity['type'] == 'Question') { // $this->handlePollCreate();