aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/mastodon_api
diff options
context:
space:
mode:
authorIlja <domainepublic@spectraltheorem.be>2020-12-18 14:29:38 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2021-08-06 07:59:53 +0200
commitf4028c908c56736b88caa5edb71f5aad21244de1 (patch)
tree1794645b7605710418b6215495c02721fc3532fd /lib/pleroma/web/mastodon_api
parent9418424048283864bd46c2f0dae769d016895220 (diff)
downloadpleroma-f4028c908c56736b88caa5edb71f5aad21244de1.tar.gz
Add key- and valuePlaceholders for quarantined_instances and mrf_simple
* I also added for keywordpolicy as well now. It was done in the admin-fe, but is better to be done here * I also added comments to explain why we did the _info keys (backwards compatibility)
Diffstat (limited to 'lib/pleroma/web/mastodon_api')
-rw-r--r--lib/pleroma/web/mastodon_api/views/instance_view.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex
index a341ca6f4..f62b52a64 100644
--- a/lib/pleroma/web/mastodon_api/views/instance_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex
@@ -100,6 +100,10 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
quarantined
|> Enum.map(fn {instance, _reason} -> instance end)
})
+ # This is for backwards compatibility. We originally didn't sent
+ # extra info like a reason why an instance was rejected/quarantined/etc.
+ # Because we didn't want to break backwards compatibility it was decided
+ # to add an extra "info" key.
|> Map.merge(%{
quarantined_instances_info: %{
"quarantined_instances" =>