]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/JsonLD.php
Friendica copyright changed from 2023 to 2034
[friendica.git] / src / Util / JsonLD.php
index beb01f0cc1106f54683ed1454e15e9a8f1d8b111..f1d4da3f5b4d91852ebf3a9a9002720ac011cf73 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2023, the Friendica project
+ * @copyright Copyright (C) 2010-2024, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -46,12 +46,21 @@ class JsonLD
                        case 'https://w3id.org/security/v1':
                                $url = DI::basePath() . '/static/security-v1.jsonld';
                                break;
+                       case 'https://w3id.org/security/data-integrity/v1':
+                               $url = DI::basePath() . '/static/security-data-integrity-v1.jsonld';
+                               break;
+                       case 'https://w3id.org/security/multikey/v1':
+                               $url = DI::basePath() . '/static/security-multikey-v1.jsonld';
+                               break;
                        case 'https://w3id.org/identity/v1':
                                $url = DI::basePath() . '/static/identity-v1.jsonld';
                                break;
                        case 'https://www.w3.org/ns/activitystreams':
                                $url = DI::basePath() . '/static/activitystreams.jsonld';
                                break;
+                       case 'https://www.w3.org/ns/did/v1':
+                               $url = DI::basePath() . '/static/did-v1.jsonld';
+                               break;
                        case 'https://funkwhale.audio/ns':
                                $url = DI::basePath() . '/static/funkwhale.audio.jsonld';
                                break;
@@ -165,6 +174,7 @@ class JsonLD
                        'mobilizon' => (object)['@id' => 'https://joinmobilizon.org/ns#', '@type' => '@id'],
                        'fedibird' => (object)['@id' => 'http://fedibird.com/ns#', '@type' => '@id'],
                        'misskey' => (object)['@id' => 'https://misskey-hub.net/ns#', '@type' => '@id'],
+                       'pixelfed' => (object)['@id' => 'http://pixelfed.org/ns#', '@type' => '@id'],
                ];
 
                $orig_json = $json;
@@ -202,7 +212,7 @@ class JsonLD
                        Logger::notice('compacting error', ['msg' => $e->getMessage(), 'previous' => $e->getPrevious(), 'line' => $e->getLine()]);
                        if ($logfailed && DI::config()->get('debug', 'ap_log_failure')) {
                                $tempfile = tempnam(System::getTempPath(), 'failed-jsonld');
-                               file_put_contents($tempfile, json_encode(['json' => $orig_json, 'callstack' => System::callstack(20), 'msg' => $e->getMessage(), 'previous' => $e->getPrevious()], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
+                               file_put_contents($tempfile, json_encode(['json' => $orig_json, 'msg' => $e->getMessage(), 'previous' => $e->getPrevious()], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
                                Logger::notice('Failed message stored', ['file' => $tempfile]);
                        }
                }