]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Followers.php
Add existence check for contact.uid and contact.rel fields in Contact::getContactTemp...
[friendica.git] / src / Module / Followers.php
index 98e9f1e0eef05f5ce3884c44662a984249e34d66..79f34021b13243ebc883b01106cbf31b92d46a1c 100644 (file)
@@ -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 Followers
@@ -18,18 +18,20 @@ class Followers 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);
 
-               $followers = ActivityPub::getFollowers($owner, $page);
+               $followers = ActivityPub\Transmitter::getFollowers($owner, $page);
 
                header('Content-Type: application/activity+json');
                echo json_encode($followers);