Merge pull request #12852 from annando/instance-fix

Fix v1 endpoint
This commit is contained in:
Philipp 2023-02-27 22:40:04 +01:00 committed by GitHub
commit a56d2f2eb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,14 +84,14 @@ class Instance extends BaseDataTransferObject
{ {
$register_policy = intval($config->get('config', 'register_policy')); $register_policy = intval($config->get('config', 'register_policy'));
$this->uri = $baseUrl; $this->uri = $baseUrl->getHost();
$this->title = $config->get('config', 'sitename'); $this->title = $config->get('config', 'sitename');
$this->short_description = $this->description = $config->get('config', 'info'); $this->short_description = $this->description = $config->get('config', 'info');
$this->email = implode(',', User::getAdminEmailList()); $this->email = implode(',', User::getAdminEmailList());
$this->version = '2.8.0 (compatible; Friendica ' . App::VERSION . ')'; $this->version = '2.8.0 (compatible; Friendica ' . App::VERSION . ')';
$this->urls = null; // Not supported $this->urls = null; // Not supported
$this->stats = new Stats($config, $database); $this->stats = new Stats($config, $database);
$this->thumbnail = $baseUrl . 'images/friendica-banner.jpg'; $this->thumbnail = $baseUrl . '/images/friendica-banner.jpg';
$this->languages = [$config->get('system', 'language')]; $this->languages = [$config->get('system', 'language')];
$this->max_toot_chars = (int)$config->get('config', 'api_import_size', $config->get('config', 'max_import_size')); $this->max_toot_chars = (int)$config->get('config', 'api_import_size', $config->get('config', 'max_import_size'));
$this->registrations = ($register_policy != Register::CLOSED); $this->registrations = ($register_policy != Register::CLOSED);