X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModule%2FFollowers.php;h=c2096cd052b28b6d99dd88e83860ce58bce57bbc;hb=fd706cf9a7a0c4700838a1f00b12d8fd37323b7c;hp=80ad68def4f6b0427fad65825842e50e16908e08;hpb=834422d52f0b34fb088f79ac2704c3d514802d8e;p=friendica.git diff --git a/src/Module/Followers.php b/src/Module/Followers.php index 80ad68def4..c2096cd052 100644 --- a/src/Module/Followers.php +++ b/src/Module/Followers.php @@ -5,31 +5,33 @@ namespace Friendica\Module; use Friendica\BaseModule; -use Friendica\Protocol\ActivityPub; use Friendica\Core\System; use Friendica\Model\User; +use Friendica\Protocol\ActivityPub; /** * ActivityPub Followers */ class Followers extends BaseModule { - public static function init() + public static function rawContent(array $parameters = []) { $a = self::getApp(); + // @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);