3 * @file src/Module/Following.php
5 namespace Friendica\Module;
7 use Friendica\BaseModule;
8 use Friendica\Core\System;
10 use Friendica\Model\User;
11 use Friendica\Protocol\ActivityPub;
14 * ActivityPub Following
16 class Following extends BaseModule
18 public static function rawContent(array $parameters = [])
22 // @TODO: Replace with parameter from router
23 if (empty($a->argv[1])) {
24 throw new \Friendica\Network\HTTPException\NotFoundException();
27 // @TODO: Replace with parameter from router
28 $owner = User::getOwnerDataByNick($a->argv[1]);
30 throw new \Friendica\Network\HTTPException\NotFoundException();
33 $page = $_REQUEST['page'] ?? null;
35 $Following = ActivityPub\Transmitter::getFollowing($owner, $page);
37 header('Content-Type: application/activity+json');
38 echo json_encode($Following);