]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/ActivityPub/Inbox.php
Merge pull request #12227 from matthiasmoritz/public_calendar
[friendica.git] / src / Module / ActivityPub / Inbox.php
index 149e51106959e24526f0f0bdb37e5db50de09982..a9858d94c8d2f77bb1f513708f121db8d421f654 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
  *
@@ -35,7 +35,7 @@ use Friendica\Util\Network;
  */
 class Inbox extends BaseModule
 {
-       public function rawContent()
+       protected function rawContent(array $request = [])
        {
                $postdata = Network::postdata();
 
@@ -50,7 +50,7 @@ class Inbox extends BaseModule
                                $filename = 'failed-activitypub';
                        }
                        $tempfile = tempnam(System::getTempPath(), $filename);
-                       file_put_contents($tempfile, json_encode(['parameters' => $this->parameters, 'header' => $_SERVER, 'body' => $postdata], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
+                       file_put_contents($tempfile, json_encode(['parameters' => $this->parameters, 'header' => $_SERVER, 'body' => $postdata], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
                        Logger::notice('Incoming message stored', ['file' => $tempfile]);
                }