diff --git a/index.php b/index.php index 604c70c..91917d7 100644 --- a/index.php +++ b/index.php @@ -185,11 +185,19 @@ } function followers() { global $server; + // The number of followers is self-reported + // You can set this to any number you like + + // Get all the files + $follower_files = glob("data/followers/*.json"); + // Number of posts + $totalItems = count( $follower_files ); + $followers = array( "@context" => "https://www.w3.org/ns/activitystreams", "id" => "https://{$server}/followers", "type" => "Collection", - "totalItems" => 0, + "totalItems" => $totalItems, "items" => [] ); header( "Content-Type: application/activity+json" );