mirror of
https://github.com/friendica/friendica
synced 2025-05-05 17:44:10 +02:00
Ckeck for host differences of fetched objects
This commit is contained in:
parent
ede41166ae
commit
50c0fd6738
2 changed files with 97 additions and 0 deletions
|
@ -26,6 +26,7 @@ use Friendica\Core\Logger;
|
|||
use Exception;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
|
||||
/**
|
||||
* This class contain methods to work with JsonLD data
|
||||
|
@ -179,6 +180,10 @@ class JsonLD
|
|||
|
||||
$orig_json = $json;
|
||||
|
||||
if (empty($json['@context'])) {
|
||||
$json['@context'] = ActivityPub::CONTEXT;
|
||||
}
|
||||
|
||||
// Preparation for adding possibly missing content to the context
|
||||
if (!empty($json['@context']) && is_string($json['@context'])) {
|
||||
$json['@context'] = [$json['@context']];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue