Merge pull request #7043 from annando/ap-workaround-context
Workaround for systems who don't use a correct context in ActivityPub
This commit is contained in:
commit
dc154ac07d
1 changed files with 6 additions and 1 deletions
|
@ -98,7 +98,12 @@ class JsonLD
|
|||
'dc' => (object)['@id' => 'http://purl.org/dc/terms/', '@type' => '@id'],
|
||||
'toot' => (object)['@id' => 'http://joinmastodon.org/ns#', '@type' => '@id']];
|
||||
|
||||
// Workaround for Nextcloud Social
|
||||
// Preparation for adding possibly missing content to the context
|
||||
if (!empty($json['@context']) && is_string($json['@context'])) {
|
||||
$json['@context'] = [$json['@context']];
|
||||
}
|
||||
|
||||
// Workaround for servers with missing context
|
||||
// See issue https://github.com/nextcloud/social/issues/330
|
||||
if (!empty($json['@context']) && is_array($json['@context'])) {
|
||||
$json['@context'][] = 'https://w3id.org/security/v1';
|
||||
|
|
Loading…
Reference in a new issue