X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FFollowing.php;h=3a68e7e0afbd9bb21852e878e2decbd718e6e0ad;hb=5f80180b47679a81433e084448b9df7d96648506;hp=091a505cc92f6b3220931017a40f49ce344d98f9;hpb=834422d52f0b34fb088f79ac2704c3d514802d8e;p=friendica.git diff --git a/src/Module/Following.php b/src/Module/Following.php index 091a505cc9..3a68e7e0af 100644 --- a/src/Module/Following.php +++ b/src/Module/Following.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 Following */ class Following extends BaseModule { - public static function init() + public static function rawContent() { $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);