diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-09-15 10:26:28 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-09-15 10:26:28 +0200 |
commit | ac2893a945a753ad05d46234ba80e14f3ce62c97 (patch) | |
tree | 892aa5b2cc19c6417d5d8c21daad8f1576499348 /lib | |
parent | 3aaf6608c65a1d10058b4fc5b08038b3f630a143 (diff) | |
download | pleroma-ac2893a945a753ad05d46234ba80e14f3ce62c97.tar.gz |
Add instance config options.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 15 |
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) |