Return maps in node_info
[akkoma] / lib / pleroma / web / mastodon_api / views / instance_view.ex
index fcb4e2466063e564ccf5c26fea083664efedd28b..db40ea3fab8f143cdc1092ffe587925950cc2290 100644 (file)
@@ -69,6 +69,10 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
       if Config.get([:gopher, :enabled]) do
         "gopher"
       end,
+      # backwards compat
+      if Config.get([:shout, :enabled]) do
+        "chat"
+      end,
       if Config.get([:shout, :enabled]) do
         "shout"
       end,
@@ -91,7 +95,11 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
       {:ok, data} = MRF.describe()
 
       data
-      |> Map.merge(%{quarantined_instances: quarantined})
+      |> Map.merge(%{
+        quarantined_instances:
+          quarantined
+          |> Enum.map(fn {instance, reason} -> %{"instance" => instance, "reason" => reason} end)
+      })
     else
       %{}
     end