summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHakaba Hitoyo <hakabahitoyo@example.com>2018-07-18 09:58:59 +0900
committerHakaba Hitoyo <hakabahitoyo@example.com>2018-07-18 09:58:59 +0900
commite4dd58307a692aaa503fccc9cdf9ebae61293f6f (patch)
treeb54b3adb0de4f685fb38f77b19defd176e7b9fc7 /lib
parent5b4a21317de6a32001699b33964c7eaeb4f0bec8 (diff)
downloadpleroma-e4dd58307a692aaa503fccc9cdf9ebae61293f6f.tar.gz
pleroma-e4dd58307a692aaa503fccc9cdf9ebae61293f6f.zip
better configuration
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex4
-rw-r--r--lib/pleroma/web/nodeinfo/nodeinfo_controller.ex1
2 files changed, 3 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 2ad6521cc..5b79f9600 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -1076,9 +1076,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
@suggestions Application.get_env(:pleroma, :suggestions)
def suggestions(%{assigns: %{user: user}} = conn, _) do
- api = Keyword.get(@suggestions, :third_party_engine, false)
+ if Keyword.get(@suggestions, :enabled, false) do
+ api = Keyword.get(@suggestions, :third_party_engine, false)
- if api do
host =
Application.get_env(:pleroma, Pleroma.Web.Endpoint)
|> Keyword.get(:url)
diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
index 5f7d6e86e..e80e63f27 100644
--- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
+++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
@@ -45,6 +45,7 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
metadata: %{
nodeName: Keyword.get(instance, :name),
mediaProxy: Keyword.get(media_proxy, :enabled),
+ suggestions: Keyword.get(suggestions, :enabled, false),
suggestionsThirdPartyEngine: Keyword.get(suggestions, :third_party_engine, false)
}
}