X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FFollowers.php;h=0907f8ba5cf594ecb3e03a5d10272c5650aeef89;hb=52789f3ae4a07b79fabc99ab01386617fa75183f;hp=98e9f1e0eef05f5ce3884c44662a984249e34d66;hpb=a8b776c189e92034ecd252e71b0fc9e5fa364a13;p=friendica.git diff --git a/src/Module/Followers.php b/src/Module/Followers.php index 98e9f1e0ee..0907f8ba5c 100644 --- a/src/Module/Followers.php +++ b/src/Module/Followers.php @@ -5,31 +5,34 @@ namespace Friendica\Module; use Friendica\BaseModule; -use Friendica\Protocol\ActivityPub; use Friendica\Core\System; +use Friendica\DI; use Friendica\Model\User; +use Friendica\Protocol\ActivityPub; /** * ActivityPub Followers */ class Followers extends BaseModule { - public static function rawContent() + public static function rawContent(array $parameters = []) { - $a = self::getApp(); + $a = DI::app(); + // @TODO: Replace with parameter from router if (empty($a->argv[1])) { - System::httpExit(404); + throw new \Friendica\Network\HTTPException\NotFoundException(); } + // @TODO: Replace with parameter from router $owner = User::getOwnerDataByNick($a->argv[1]); if (empty($owner)) { - System::httpExit(404); + throw new \Friendica\Network\HTTPException\NotFoundException(); } - $page = defaults($_REQUEST, 'page', null); + $page = $_REQUEST['page'] ?? null; - $followers = ActivityPub::getFollowers($owner, $page); + $followers = ActivityPub\Transmitter::getFollowers($owner, $page); header('Content-Type: application/activity+json'); echo json_encode($followers);