<?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
*
use Friendica\DI;
use Friendica\Model\User;
use Friendica\Network\HTTPException;
-use Friendica\Network\HTTPException\ImATeapotException;
use Friendica\Protocol\ActivityPub;
/**
*/
class Friendica extends BaseModule
{
- public static function content(array $parameters = [])
+ protected function content(array $request = []): string
{
$config = DI::config();
]);
}
- public static function rawContent(array $parameters = [])
+ protected function rawContent(array $request = [])
{
- if (ActivityPub::isRequest()) {
+ // @TODO: Replace with parameter from router
+ if (DI::args()->getArgc() <= 1 || (DI::args()->getArgv()[1] !== 'json')) {
+ if (!ActivityPub::isRequest()) {
+ return;
+ }
+
try {
$data = ActivityPub\Transmitter::getProfile(0);
header('Access-Control-Allow-Origin: *');
}
}
- // @TODO: Replace with parameter from router
- if (DI::args()->getArgc() <= 1 || (DI::args()->getArgv()[1] !== 'json')) {
- return;
- }
-
$config = DI::config();
$register_policies = [