]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/JsonLD.php
messages.po and and corrected typo in comment
[friendica.git] / src / Util / JsonLD.php
index 51d15cb10afa93f9b844c05a54267feb1d6c76e1..4409b25dc59d22806b79be24a2aeb037d4147c0c 100644 (file)
@@ -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.