X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModule%2FFollowing.php;h=3a68e7e0afbd9bb21852e878e2decbd718e6e0ad;hb=b5a9a1f1d312b50631c2f8b35807f74116d912a8;hp=6023db4cbe72ff821797355e0c2aa5862154d263;hpb=a8b776c189e92034ecd252e71b0fc9e5fa364a13;p=friendica.git diff --git a/src/Module/Following.php b/src/Module/Following.php index 6023db4cbe..3a68e7e0af 100644 --- a/src/Module/Following.php +++ b/src/Module/Following.php @@ -5,9 +5,9 @@ namespace Friendica\Module; use Friendica\BaseModule; -use Friendica\Protocol\ActivityPub; use Friendica\Core\System; use Friendica\Model\User; +use Friendica\Protocol\ActivityPub; /** * ActivityPub Following @@ -18,18 +18,20 @@ class Following extends BaseModule { $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); - $Following = ActivityPub::getFollowing($owner, $page); + $Following = ActivityPub\Transmitter::getFollowing($owner, $page); header('Content-Type: application/activity+json'); echo json_encode($Following);