Bookwyrm posts now work

This commit is contained in:
Michael 2022-07-23 12:50:15 +00:00
parent 7eb410bed7
commit 8c602071c2
5 changed files with 49 additions and 25 deletions

View file

@ -177,6 +177,13 @@ class JsonLD
}
}
// Bookwyrm transmits "id" fields with "null", which isn't allowed.
array_walk_recursive($json, function (&$value, $key) {
if ($key == 'id' && is_null($value)) {
$value = '';
}
});
$jsonobj = json_decode(json_encode($json, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
try {