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