add suggestionsThirdPartyEngine into /nodeinfo/2.0.json
authorHakaba Hitoyo <hakabahitoyo@example.com>
Tue, 17 Jul 2018 07:56:30 +0000 (16:56 +0900)
committerHakaba Hitoyo <hakabahitoyo@example.com>
Tue, 17 Jul 2018 07:56:30 +0000 (16:56 +0900)
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex

index 12aca4a10d12634c28467a3fbef7522825045b0d..77401c554fcf69a5637a6dc4fa465efac0b2aaa7 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 = %{
@@ -43,7 +44,8 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
       },
       metadata: %{
         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)
       }
     }