Merge pull request #8771 from annando/annando/issue8663
Abuse mail received because of "unusual traffic"
This commit is contained in:
commit
64de416761
|
@ -1627,15 +1627,18 @@ class GServer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Discover federated servers
|
// Discover federated servers
|
||||||
$curlResult = Network::fetchUrl("http://the-federation.info/pods.json");
|
$protocols = ['activitypub', 'diaspora', 'dfrn', 'ostatus'];
|
||||||
|
foreach ($protocols as $protocol) {
|
||||||
if (!empty($curlResult)) {
|
$query = '{nodes(protocol:"' . $protocol . '"){host}}';
|
||||||
$servers = json_decode($curlResult, true);
|
$curlResult = Network::fetchUrl('https://the-federation.info/graphql?query=' . urlencode($query));
|
||||||
|
if (!empty($curlResult)) {
|
||||||
if (!empty($servers['pods'])) {
|
$data = json_decode($curlResult, true);
|
||||||
foreach ($servers['pods'] as $server) {
|
if (!empty($data['data']['nodes'])) {
|
||||||
// Using "only_nodeinfo" since servers that are listed on that page should always have it.
|
foreach ($data['data']['nodes'] as $server) {
|
||||||
Worker::add(PRIORITY_LOW, 'UpdateGServer', 'https://' . $server['host'], true);
|
// Using "only_nodeinfo" since servers that are listed on that page should always have it.
|
||||||
|
echo $server['host']."\n";
|
||||||
|
Worker::add(PRIORITY_LOW, 'UpdateGServer', 'https://' . $server['host'], true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user