aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-15 10:26:28 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-15 10:26:28 +0200
commitac2893a945a753ad05d46234ba80e14f3ce62c97 (patch)
tree892aa5b2cc19c6417d5d8c21daad8f1576499348 /lib
parent3aaf6608c65a1d10058b4fc5b08038b3f630a143 (diff)
downloadpleroma-ac2893a945a753ad05d46234ba80e14f3ce62c97.tar.gz
Add instance config options.
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)