merge
[akkoma] / lib / pleroma / web / nodeinfo / nodeinfo_controller.ex
index 7c67bbf1c6f237c1107b6898edf7279716e9d589..f9a6d9c25c8f9953ec9893d8c194cea1fea1344f 100644 (file)
@@ -21,6 +21,7 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
   def nodeinfo(conn, %{"version" => "2.0"}) do
     instance = Application.get_env(:pleroma, :instance)
     media_proxy = Application.get_env(:pleroma, :media_proxy)
+    suggestions = Application.get_env(:pleroma, :suggestions)
     stats = Stats.get_stats()
 
     response = %{
@@ -45,7 +46,12 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
         nodeName: Keyword.get(instance, :name),
         nodeDescription: Keyword.get(instance, :description),
         mediaProxy: Keyword.get(media_proxy, :enabled),
-        private: !Keyword.get(instance, :public, true)
+        private: !Keyword.get(instance, :public, true),
+        suggestions: %{
+          enabled: Keyword.get(suggestions, :enabled, false),
+          thirdPartyEngine: Keyword.get(suggestions, :third_party_engine, ""),
+          timeout: Keyword.get(suggestions, :timeout, 5000)
+        }
       }
     }