* @todo Detect if it is a forum
*/
+use \Friendica\Core\Config;
+
require_once('include/datetime.php');
require_once("include/Scrape.php");
require_once("include/network.php");
}
}
+ // Disvover Mastodon servers
+ if (!Config::get('system','ostatus_disabled')) {
+ $serverdata = fetch_url("https://instances.mastodon.xyz/instances.json");
+
+ if ($serverdata) {
+ $servers = json_decode($serverdata);
+
+ foreach ($servers AS $server) {
+ $url = (is_null($server->https_score) ? 'http' : 'https').'://'.$server->name;
+ proc_run(PRIORITY_LOW, "include/discover_poco.php", "server", base64_encode($url));
+ }
+ }
+ }
+
// Currently disabled, since the service isn't available anymore.
// It is not removed since I hope that there will be a successor.
// Discover GNU Social Servers.