X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FJsonLD.php;h=0a4d5a0b55bf40808e891f81a1d832e0377ca3c1;hb=450c75300476942619bc350f4e80a5f658ffb24f;hp=51d15cb10afa93f9b844c05a54267feb1d6c76e1;hpb=c9f92f41fbe77fc92e102d16ac6fc5f0b13e2e06;p=friendica.git diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index 51d15cb10a..0a4d5a0b55 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -1,6 +1,6 @@ $url]); @@ -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.