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