3 * @file src/Module/Outbox.php
5 namespace Friendica\Module;
7 use Friendica\BaseModule;
8 use Friendica\Core\System;
10 use Friendica\Model\User;
11 use Friendica\Protocol\ActivityPub;
16 class Outbox extends BaseModule
18 public static function rawContent(array $parameters = [])
22 // @TODO: Replace with parameter from router
23 if (empty($a->argv[1])) {
24 throw new \Friendica\Network\HTTPException\NotFoundException();
27 $owner = User::getOwnerDataByNick($a->argv[1]);
29 throw new \Friendica\Network\HTTPException\NotFoundException();
32 $page = $_REQUEST['page'] ?? null;
34 /// @todo Add Authentication to enable fetching of non public content
35 // $requester = HTTPSignature::getSigner('', $_SERVER);
37 $outbox = ActivityPub\Transmitter::getOutbox($owner, $page);
39 header('Content-Type: application/activity+json');
40 echo json_encode($outbox);