1
0
Fork 0
mirror of https://git.friendi.ca/friendica/friendica.git synced 2025-07-27 22:01:49 +00:00

Issue 12419: Quickhack to make GoToSocial work

This commit is contained in:
Michael 2022-12-19 21:21:06 +00:00
parent 45ee7d55f0
commit e733adcaae

View 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.