]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/JsonLD.php
Merge pull request #11452 from atjn/manifest-icons
[friendica.git] / src / Util / JsonLD.php
index f91d84ad5c13cd5e98a39b97db2835baa3ac176f..cf1e058a1478711535a950c5cb63bfe2f1c7f0f6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -21,7 +21,7 @@
 
 namespace Friendica\Util;
 
-use Friendica\Core\Cache\Duration;
+use Friendica\Core\Cache\Enum\Duration;
 use Friendica\Core\Logger;
 use Exception;
 use Friendica\DI;
@@ -139,7 +139,9 @@ class JsonLD
                        'toot' => (object)['@id' => 'http://joinmastodon.org/ns#', '@type' => '@id'],
                        'litepub' => (object)['@id' => 'http://litepub.social/ns#', '@type' => '@id'],
                        'sc' => (object)['@id' => 'http://schema.org#', '@type' => '@id'],
-                       'pt' => (object)['@id' => 'https://joinpeertube.org/ns#', '@type' => '@id']];
+                       'pt' => (object)['@id' => 'https://joinpeertube.org/ns#', '@type' => '@id'],
+                       'mobilizon' => (object)['@id' => 'https://joinmobilizon.org/ns#', '@type' => '@id'],
+               ];
 
                // Preparation for adding possibly missing content to the context
                if (!empty($json['@context']) && is_string($json['@context'])) {
@@ -165,7 +167,7 @@ class JsonLD
                }
                catch (Exception $e) {
                        $compacted = false;
-                       Logger::error('compacting error', ['line' => $e->getLine(), 'message' => $e->getMessage()]);
+                       Logger::notice('compacting error', ['line' => $e->getLine(), 'exception' => $e]);
                }
 
                $json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);