aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhref <href@random.sh>2018-12-07 19:44:45 +0100
committerhref <href@random.sh>2018-12-07 19:44:45 +0100
commit134cc94cbde7d456fbfc489f6d7eff80b98c64dd (patch)
tree0a088c3c580e885f4825c243796717b8719a689d
parent94d8f1ab305b513931b81d7a4b3e41e30b688a16 (diff)
downloadpleroma-134cc94cbde7d456fbfc489f6d7eff80b98c64dd.tar.gz
Nodeinfo: remove null features; relay feature.
-rw-r--r--lib/pleroma/web/nodeinfo/nodeinfo_controller.ex39
1 files changed, 22 insertions, 17 deletions
diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
index 2ea75cf16..277dc6ba1 100644
--- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
+++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
@@ -71,23 +71,28 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
%{}
end
- features = [
- "pleroma_api",
- "mastodon_api",
- "mastodon_api_streaming",
- if Keyword.get(media_proxy, :enabled) do
- "media_proxy"
- end,
- if Keyword.get(gopher, :enabled) do
- "gopher"
- end,
- if Keyword.get(chat, :enabled) do
- "chat"
- end,
- if Keyword.get(suggestions, :enabled) do
- "suggestions"
- end
- ]
+ features =
+ [
+ "pleroma_api",
+ "mastodon_api",
+ "mastodon_api_streaming",
+ if Keyword.get(media_proxy, :enabled) do
+ "media_proxy"
+ end,
+ if Keyword.get(gopher, :enabled) do
+ "gopher"
+ end,
+ if Keyword.get(chat, :enabled) do
+ "chat"
+ end,
+ if Keyword.get(suggestions, :enabled) do
+ "suggestions"
+ end,
+ if Keyword.get(instance, :allow_relay) do
+ "relay"
+ end
+ ]
+ |> Enum.filter(& &1)
response = %{
version: "2.0",