features: features(),
federation: federation(),
fields_limits: fields_limits(),
- post_formats: Config.get([:instance, :allowed_post_formats])
+ post_formats: Config.get([:instance, :allowed_post_formats]),
+ privileged_staff: Config.get([:instance, :privileged_staff])
},
stats: %{mau: Pleroma.User.active_user_count()},
vapid_public_key: Keyword.get(Pleroma.Web.Push.vapid_config(), :public_key)
"mastodon_api",
"mastodon_api_streaming",
"polls",
+ "v2_suggestions",
"pleroma_explicit_addressing",
"shareable_emoji_packs",
"multifetch",
if Config.get([:media_proxy, :enabled]) do
"media_proxy"
end,
- if Config.get([:gopher, :enabled]) do
- "gopher"
- end,
# backwards compat
if Config.get([:shout, :enabled]) do
"chat"
"safe_dm_mentions"
end,
"pleroma_emoji_reactions",
- "pleroma_chat_messages"
+ "pleroma_chat_messages",
+ if Config.get([:instance, :show_reactions]) do
+ "exposable_reactions"
+ end,
+ if Config.get([:instance, :profile_directory]) do
+ "profile_directory"
+ end,
+ "custom_emoji_reactions"
]
|> Enum.filter(& &1)
end
{:ok, data} = MRF.describe()
data
- |> Map.merge(%{
- quarantined_instances:
+ |> Map.put(
+ :quarantined_instances,
+ Enum.map(quarantined, 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.put(:quarantined_instances_info, %{
+ "quarantined_instances" =>
quarantined
- |> 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(%{})
- }
+ |> Enum.map(fn {instance, reason} -> {instance, %{"reason" => reason}} end)
+ |> Map.new()
})
else
%{}