config = $config; } protected function rawContent(array $request = []) { $nodeinfo = [ 'version' => '2.0', 'software' => [ 'name' => 'friendica', 'version' => App::VERSION . '-' . DB_UPDATE_VERSION, ], 'protocols' => ['dfrn', 'activitypub'], 'services' => Nodeinfo::getServices(), 'openRegistrations' => Register::getPolicy() !== Register::CLOSED, 'usage' => Nodeinfo::getUsage(), 'metadata' => [ 'nodeName' => $this->config->get('config', 'sitename'), 'nodeDescription' => $this->config->get('config', 'info'), ], ]; if (!empty($this->config->get('system', 'diaspora_enabled'))) { $nodeinfo['protocols'][] = 'diaspora'; } $nodeinfo['services']['inbound'][] = 'atom1.0'; $nodeinfo['services']['inbound'][] = 'rss2.0'; $nodeinfo['services']['outbound'][] = 'atom1.0'; if (function_exists('imap_open') && !$this->config->get('system', 'imap_disabled')) { $nodeinfo['services']['inbound'][] = 'imap'; } $nodeinfo['metadata']['explicitContent'] = $this->config->get('system', 'explicit_content', false) == true; $this->response->setType(ICanCreateResponses::TYPE_JSON, 'application/json; charset=utf-8'); $this->response->addContent(json_encode($nodeinfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } }