Nodeinfo: remove null features; relay feature.

This commit is contained in:
href 2018-12-07 19:44:45 +01:00
parent 94d8f1ab30
commit 134cc94cbd
No known key found for this signature in database
GPG Key ID: EE8296C1A152C325

View File

@ -71,23 +71,28 @@ def nodeinfo(conn, %{"version" => "2.0"}) 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",