From: Michael Date: Mon, 19 Dec 2022 21:21:06 +0000 (+0000) Subject: Issue 12419: Quickhack to make GoToSocial work X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e733adcaae54d0efbf537e62eb9380c83b49c0bd;p=friendica.git Issue 12419: Quickhack to make GoToSocial work --- diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index 51d15cb10a..4409b25dc5 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -177,6 +177,12 @@ class JsonLD if (!in_array('https://w3id.org/security/v1', $json['@context'])) { $json['@context'][] = 'https://w3id.org/security/v1'; } + + // Issue 12419: Workaround for GoToSocial + $pos = array_search('http://joinmastodon.org/ns', $json['@context']); + if (is_int($pos)) { + $json['@context'][$pos] = ['toot' => 'http://joinmastodon.org/ns#']; + } } // Bookwyrm transmits "id" fields with "null", which isn't allowed.