From cf219b6addab9fffca0b2e996fa8de1d7fbcd198 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 17 Jul 2018 15:10:14 +0000 Subject: [PATCH] config: make instance description configurable --- config/config.exs | 1 + lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 2 +- lib/pleroma/web/nodeinfo/nodeinfo_controller.ex | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config/config.exs b/config/config.exs index 0616fe4fb..51b953a94 100644 --- a/config/config.exs +++ b/config/config.exs @@ -52,6 +52,7 @@ version: version, name: "Pleroma", email: "example@example.com", + description: "A Pleroma instance, an alternative fediverse server", limit: 5000, upload_limit: 16_000_000, registrations_open: true, diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 09e6b0b59..f521960c2 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -125,7 +125,7 @@ def masto_instance(conn, _params) do response = %{ uri: Web.base_url(), title: Keyword.get(@instance, :name), - description: "A Pleroma instance, an alternative fediverse server", + description: Keyword.get(@instance, :description), version: "#{@mastodon_api_level} (compatible; #{Keyword.get(@instance, :version)})", email: Keyword.get(@instance, :email), urls: %{ diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex index 12aca4a10..7c67bbf1c 100644 --- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex +++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex @@ -43,7 +43,9 @@ def nodeinfo(conn, %{"version" => "2.0"}) do }, metadata: %{ nodeName: Keyword.get(instance, :name), - mediaProxy: Keyword.get(media_proxy, :enabled) + nodeDescription: Keyword.get(instance, :description), + mediaProxy: Keyword.get(media_proxy, :enabled), + private: !Keyword.get(instance, :public, true) } }