<?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
*
namespace Friendica\Module\ActivityPub;
use Friendica\BaseModule;
+use Friendica\Core\System;
use Friendica\Model\User;
use Friendica\Protocol\ActivityPub;
use Friendica\Util\HTTPSignature;
throw new \Friendica\Network\HTTPException\NotFoundException();
}
- $page = $_REQUEST['page'] ?? null;
+ $page = !empty($request['page']) ? (int)$request['page'] : null;
$requester = HTTPSignature::getSigner('', $_SERVER);
$outbox = ActivityPub\Transmitter::getOutbox($owner, $page, $requester);
- header('Content-Type: application/activity+json');
- echo json_encode($outbox);
- exit();
+
+ System::jsonExit($outbox, 'application/activity+json');
}
}