Nodeinfo: remove null features; relay feature.
This commit is contained in:
parent
94d8f1ab30
commit
134cc94cbd
|
@ -71,23 +71,28 @@ def nodeinfo(conn, %{"version" => "2.0"}) do
|
||||||
%{}
|
%{}
|
||||||
end
|
end
|
||||||
|
|
||||||
features = [
|
features =
|
||||||
"pleroma_api",
|
[
|
||||||
"mastodon_api",
|
"pleroma_api",
|
||||||
"mastodon_api_streaming",
|
"mastodon_api",
|
||||||
if Keyword.get(media_proxy, :enabled) do
|
"mastodon_api_streaming",
|
||||||
"media_proxy"
|
if Keyword.get(media_proxy, :enabled) do
|
||||||
end,
|
"media_proxy"
|
||||||
if Keyword.get(gopher, :enabled) do
|
end,
|
||||||
"gopher"
|
if Keyword.get(gopher, :enabled) do
|
||||||
end,
|
"gopher"
|
||||||
if Keyword.get(chat, :enabled) do
|
end,
|
||||||
"chat"
|
if Keyword.get(chat, :enabled) do
|
||||||
end,
|
"chat"
|
||||||
if Keyword.get(suggestions, :enabled) do
|
end,
|
||||||
"suggestions"
|
if Keyword.get(suggestions, :enabled) do
|
||||||
end
|
"suggestions"
|
||||||
]
|
end,
|
||||||
|
if Keyword.get(instance, :allow_relay) do
|
||||||
|
"relay"
|
||||||
|
end
|
||||||
|
]
|
||||||
|
|> Enum.filter(& &1)
|
||||||
|
|
||||||
response = %{
|
response = %{
|
||||||
version: "2.0",
|
version: "2.0",
|
||||||
|
|
Loading…
Reference in a new issue