X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FActivityPub%2FFollowers.php;h=48236da301580f1a1d7d892b8129a9a827a4d962;hb=99284222c1d7fb4adca9077e3057faf3b36f7180;hp=fbf5bf282e8834344e989bc3302fb541647c3a77;hpb=322b7c856ca9ba53bd9c7da50dd5c1e3c9197d56;p=friendica.git diff --git a/src/Module/ActivityPub/Followers.php b/src/Module/ActivityPub/Followers.php index fbf5bf282e..48236da301 100644 --- a/src/Module/ActivityPub/Followers.php +++ b/src/Module/ActivityPub/Followers.php @@ -22,9 +22,11 @@ namespace Friendica\Module\ActivityPub; use Friendica\BaseModule; +use Friendica\Core\System; use Friendica\Model\Contact; use Friendica\Model\User; use Friendica\Protocol\ActivityPub; +use Friendica\Util\HTTPSignature; /** * ActivityPub Followers @@ -43,12 +45,10 @@ class Followers extends BaseModule throw new \Friendica\Network\HTTPException\NotFoundException(); } - $page = $_REQUEST['page'] ?? null; + $page = !empty($request['page']) ? (int)$request['page'] : null; - $followers = ActivityPub\Transmitter::getContacts($owner, [Contact::FOLLOWER, Contact::FRIEND], 'followers', $page); + $followers = ActivityPub\Transmitter::getContacts($owner, [Contact::FOLLOWER, Contact::FRIEND], 'followers', $page, (string)HTTPSignature::getSigner('', $_SERVER)); - header('Content-Type: application/activity+json'); - echo json_encode($followers); - exit(); + System::jsonExit($followers, 'application/activity+json'); } }