X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FOutbox.php;h=6e095b730671d3d18f8ce91123b0b4931b72e13f;hb=15caf4b3f7eacda399a56b1ad8eeb9d3257306d9;hp=4fc05076310ad2593fb6dff4d469b9c243eb6da1;hpb=f8c0f24e34e124ab782d5dcf3d2d658d70e19e5c;p=friendica.git diff --git a/src/Module/Outbox.php b/src/Module/Outbox.php index 4fc0507631..6e095b7306 100644 --- a/src/Module/Outbox.php +++ b/src/Module/Outbox.php @@ -1,22 +1,40 @@ . + * */ + namespace Friendica\Module; use Friendica\BaseModule; -use Friendica\Core\System; +use Friendica\DI; use Friendica\Model\User; use Friendica\Protocol\ActivityPub; +use Friendica\Util\HTTPSignature; /** * ActivityPub Outbox */ class Outbox extends BaseModule { - public static function rawContent() + public static function rawContent(array $parameters = []) { - $a = self::getApp(); + $a = DI::app(); // @TODO: Replace with parameter from router if (empty($a->argv[1])) { @@ -30,11 +48,8 @@ class Outbox extends BaseModule $page = $_REQUEST['page'] ?? null; - /// @todo Add Authentication to enable fetching of non public content - // $requester = HTTPSignature::getSigner('', $_SERVER); - - $outbox = ActivityPub\Transmitter::getOutbox($owner, $page); - + $requester = HTTPSignature::getSigner('', $_SERVER); + $outbox = ActivityPub\Transmitter::getOutbox($owner, $page, $requester); header('Content-Type: application/activity+json'); echo json_encode($outbox); exit();