mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 18:17:55 +00:00
add suggestionsThirdPartyEngine into /nodeinfo/2.0.json
This commit is contained in:
parent
d76f0d87be
commit
2b7b1b3e6b
|
@ -21,6 +21,7 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
|
||||||
def nodeinfo(conn, %{"version" => "2.0"}) do
|
def nodeinfo(conn, %{"version" => "2.0"}) do
|
||||||
instance = Application.get_env(:pleroma, :instance)
|
instance = Application.get_env(:pleroma, :instance)
|
||||||
media_proxy = Application.get_env(:pleroma, :media_proxy)
|
media_proxy = Application.get_env(:pleroma, :media_proxy)
|
||||||
|
suggestions = Application.get_env(:pleroma, :suggestions)
|
||||||
stats = Stats.get_stats()
|
stats = Stats.get_stats()
|
||||||
|
|
||||||
response = %{
|
response = %{
|
||||||
|
@ -43,7 +44,8 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
|
||||||
},
|
},
|
||||||
metadata: %{
|
metadata: %{
|
||||||
nodeName: Keyword.get(instance, :name),
|
nodeName: Keyword.get(instance, :name),
|
||||||
mediaProxy: Keyword.get(media_proxy, :enabled)
|
mediaProxy: Keyword.get(media_proxy, :enabled),
|
||||||
|
suggestionsThirdPartyEngine: Keyword.get(@suggestions, :third_party_engine, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue