quarantine instances info
Added a new field in the nodeinfo called quarantined_instances_info
This holds an object like `"quarantined_instances_info":{"quarantined_instances":{"quar.inst":{"reason":"whatever reason"}}}}`
This commit is contained in:
parent
47fc57bbcc
commit
03030b47c2
2 changed files with 42 additions and 12 deletions
|
|
@ -98,7 +98,15 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
|
|||
|> Map.merge(%{
|
||||
quarantined_instances:
|
||||
quarantined
|
||||
|> Enum.map(fn {instance, reason} -> %{"instance" => instance, "reason" => reason} end)
|
||||
|> Enum.map(fn {instance, _reason} -> instance end)
|
||||
})
|
||||
|> Map.merge(%{
|
||||
quarantined_instances_info: %{
|
||||
"quarantined_instances" =>
|
||||
quarantined
|
||||
|> Enum.map(fn {instance, reason} -> {instance, %{"reason" => reason}} end)
|
||||
|> Enum.into(%{})
|
||||
}
|
||||
})
|
||||
else
|
||||
%{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue