aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index c713c561b..fa7f24f2d 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -39,12 +39,23 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
end
+ @instance Application.get_env(:pleroma, :instance)
+
def masto_instance(conn, _params) do
response = %{
uri: Web.base_url,
- title: Web.base_url,
+ title: Keyword.get(@instance, :name),
description: "A Pleroma instance, an alternative fediverse server",
- version: "Pleroma Dev"
+ version: Keyword.get(@instance, :version),
+ email: Keyword.get(@instance, :email),
+ urls: %{
+ streaming_api: String.replace(Web.base_url, ["http","https"], "wss")
+ },
+ stats: %{
+ user_count: 1,
+ status_count: 2,
+ domain_count: 3
+ }
}
json(conn, response)