1
0
Fork 0
mirror of https://git.pleroma.social/pleroma/pleroma.git synced 2025-04-09 04:24:07 +00:00

Expose markup configuration in InstanceView

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-04-30 17:33:11 +02:00 committed by Nicole Mikołajczyk
parent 254b31bf1c
commit 890ac8ff86

View file

@ -270,7 +270,8 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
post_formats: Config.get([:instance, :allowed_post_formats]),
birthday_required: Config.get([:instance, :birthday_required]),
birthday_min_age: Config.get([:instance, :birthday_min_age]),
translation: supported_languages()
translation: supported_languages(),
markup: markup()
},
stats: %{mau: Pleroma.User.active_user_count()},
vapid_public_key: Keyword.get(Pleroma.Web.Push.vapid_config(), :public_key)
@ -321,4 +322,12 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
target_languages: target_languages
}
end
defp markup() do
%{
allow_inline_images: Config.get([:markup, :allow_inline_images]),
allow_headings: Config.get([:markup, :allow_headings]),
allow_tables: Config.get([:markup, :allow_tables])
}
end
end