3 * @file src/Module/Outbox.php
5 namespace Friendica\Module;
7 use Friendica\BaseModule;
8 use Friendica\Protocol\ActivityPub;
9 use Friendica\Core\System;
10 use Friendica\Model\User;
11 use Friendica\Util\HTTPSignature;
16 class Outbox extends BaseModule
18 public static function rawContent()
22 if (empty($a->argv[1])) {
23 System::httpExit(404);
26 $owner = User::getOwnerDataByNick($a->argv[1]);
28 System::httpExit(404);
31 $page = defaults($_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);