Calculate follower numbers
rodzic
2a694f8290
commit
cf07fe0b58
10
index.php
10
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" );
|
||||
|
|
Ładowanie…
Reference in New Issue