Allow activities 'to' and 'cc' to be solo values in accordance with json-ld spec

pull/6427/head
Grant 1 month ago
parent 47b33b0a29
commit 631c0913af

@ -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();

Loading…
Cancel
Save