Merge pull request #11766 from MrPetovan/bug/11765-nodeinfo-usage
Add expected "usage.users" property to all versions of NodeInfo
This commit is contained in:
commit
b5c293762e
|
@ -79,6 +79,7 @@ class Nodeinfo
|
||||||
$config = DI::config();
|
$config = DI::config();
|
||||||
|
|
||||||
$usage = new stdClass();
|
$usage = new stdClass();
|
||||||
|
$usage->users = [];
|
||||||
|
|
||||||
if (!empty($config->get('system', 'nodeinfo'))) {
|
if (!empty($config->get('system', 'nodeinfo'))) {
|
||||||
$usage->users = [
|
$usage->users = [
|
||||||
|
|
|
@ -63,8 +63,8 @@ class NodeInfo110 extends BaseModule
|
||||||
'friendica'
|
'friendica'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'services' => [],
|
'services' => Nodeinfo::getServices(),
|
||||||
'usage' => [],
|
'usage' => Nodeinfo::getUsage(),
|
||||||
'openRegistrations' => intval($this->config->get('config', 'register_policy')) !== Register::CLOSED,
|
'openRegistrations' => intval($this->config->get('config', 'register_policy')) !== Register::CLOSED,
|
||||||
'metadata' => [
|
'metadata' => [
|
||||||
'nodeName' => $this->config->get('config', 'sitename'),
|
'nodeName' => $this->config->get('config', 'sitename'),
|
||||||
|
@ -81,10 +81,6 @@ class NodeInfo110 extends BaseModule
|
||||||
$nodeinfo['protocols']['outbound'][] = 'gnusocial';
|
$nodeinfo['protocols']['outbound'][] = 'gnusocial';
|
||||||
}
|
}
|
||||||
|
|
||||||
$nodeinfo['usage'] = Nodeinfo::getUsage();
|
|
||||||
|
|
||||||
$nodeinfo['services'] = Nodeinfo::getServices();
|
|
||||||
|
|
||||||
$nodeinfo['metadata']['protocols'] = $nodeinfo['protocols'];
|
$nodeinfo['metadata']['protocols'] = $nodeinfo['protocols'];
|
||||||
$nodeinfo['metadata']['protocols']['outbound'][] = 'atom1.0';
|
$nodeinfo['metadata']['protocols']['outbound'][] = 'atom1.0';
|
||||||
$nodeinfo['metadata']['protocols']['inbound'][] = 'atom1.0';
|
$nodeinfo['metadata']['protocols']['inbound'][] = 'atom1.0';
|
||||||
|
|
|
@ -56,8 +56,8 @@ class NodeInfo120 extends BaseModule
|
||||||
'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION,
|
'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION,
|
||||||
],
|
],
|
||||||
'protocols' => ['dfrn', 'activitypub'],
|
'protocols' => ['dfrn', 'activitypub'],
|
||||||
'services' => [],
|
'services' => Nodeinfo::getServices(),
|
||||||
'usage' => [],
|
'usage' => Nodeinfo::getUsage(),
|
||||||
'openRegistrations' => intval($this->config->get('config', 'register_policy')) !== Register::CLOSED,
|
'openRegistrations' => intval($this->config->get('config', 'register_policy')) !== Register::CLOSED,
|
||||||
'metadata' => [
|
'metadata' => [
|
||||||
'nodeName' => $this->config->get('config', 'sitename'),
|
'nodeName' => $this->config->get('config', 'sitename'),
|
||||||
|
@ -72,10 +72,6 @@ class NodeInfo120 extends BaseModule
|
||||||
$nodeinfo['protocols'][] = 'ostatus';
|
$nodeinfo['protocols'][] = 'ostatus';
|
||||||
}
|
}
|
||||||
|
|
||||||
$nodeinfo['usage'] = Nodeinfo::getUsage();
|
|
||||||
|
|
||||||
$nodeinfo['services'] = Nodeinfo::getServices();
|
|
||||||
|
|
||||||
if (Addon::isEnabled('twitter')) {
|
if (Addon::isEnabled('twitter')) {
|
||||||
$nodeinfo['services']['inbound'][] = 'twitter';
|
$nodeinfo['services']['inbound'][] = 'twitter';
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,9 +59,9 @@ class NodeInfo210 extends BaseModule
|
||||||
],
|
],
|
||||||
'organization' => Nodeinfo::getOrganization($this->config),
|
'organization' => Nodeinfo::getOrganization($this->config),
|
||||||
'protocols' => ['dfrn', 'activitypub'],
|
'protocols' => ['dfrn', 'activitypub'],
|
||||||
'services' => [],
|
'services' => Nodeinfo::getServices(),
|
||||||
'openRegistrations' => intval($this->config->get('config', 'register_policy')) !== Register::CLOSED,
|
'openRegistrations' => intval($this->config->get('config', 'register_policy')) !== Register::CLOSED,
|
||||||
'usage' => [],
|
'usage' => Nodeinfo::getUsage(true),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!empty($this->config->get('system', 'diaspora_enabled'))) {
|
if (!empty($this->config->get('system', 'diaspora_enabled'))) {
|
||||||
|
@ -72,10 +72,6 @@ class NodeInfo210 extends BaseModule
|
||||||
$nodeinfo['protocols'][] = 'ostatus';
|
$nodeinfo['protocols'][] = 'ostatus';
|
||||||
}
|
}
|
||||||
|
|
||||||
$nodeinfo['usage'] = Nodeinfo::getUsage(true);
|
|
||||||
|
|
||||||
$nodeinfo['services'] = Nodeinfo::getServices();
|
|
||||||
|
|
||||||
if (Addon::isEnabled('twitter')) {
|
if (Addon::isEnabled('twitter')) {
|
||||||
$nodeinfo['services']['inbound'][] = 'twitter';
|
$nodeinfo['services']['inbound'][] = 'twitter';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user