From 705b2d4c41ee2ee62f41f1fa609ba5404ecd88ec Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 3 Oct 2023 20:55:15 -0400 Subject: [PATCH] Add support for source_url in Mastodon\InstanceV2 --- src/Module/Api/Mastodon/InstanceV2.php | 2 ++ src/Object/Api/Mastodon/InstanceV2.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Module/Api/Mastodon/InstanceV2.php b/src/Module/Api/Mastodon/InstanceV2.php index 64d0955629..5e7511c028 100644 --- a/src/Module/Api/Mastodon/InstanceV2.php +++ b/src/Module/Api/Mastodon/InstanceV2.php @@ -85,6 +85,7 @@ class InstanceV2 extends BaseApi $domain = $this->baseUrl->getHost(); $title = $this->config->get('config', 'sitename'); $version = '2.8.0 (compatible; Friendica ' . App::VERSION . ')'; + $source_url = 'https://git.friendi.ca/friendica/friendica'; $description = $this->config->get('config', 'info'); $usage = $this->buildUsageInfo(); $thumbnail = new InstanceEntity\Thumbnail($this->baseUrl . $this->contactHeader->getMastodonBannerPath()); @@ -98,6 +99,7 @@ class InstanceV2 extends BaseApi $domain, $title, $version, + $source_url, $description, $usage, $thumbnail, diff --git a/src/Object/Api/Mastodon/InstanceV2.php b/src/Object/Api/Mastodon/InstanceV2.php index ec32b944f0..89cca6daa7 100644 --- a/src/Object/Api/Mastodon/InstanceV2.php +++ b/src/Object/Api/Mastodon/InstanceV2.php @@ -81,6 +81,7 @@ class InstanceV2 extends BaseDataTransferObject string $domain, string $title, string $version, + string $source_url, string $description, Usage $usage, Thumbnail $thumbnail, @@ -94,7 +95,7 @@ class InstanceV2 extends BaseDataTransferObject $this->domain = $domain; $this->title = $title; $this->version = $version; - $this->source_url = null; //not supported yet + $this->source_url = $source_url; $this->description = $description; $this->usage = $usage; $this->thumbnail = $thumbnail;