commit: 890ac8ff86e28af464f56fc023d9d7e2f4bc2f1a
parent 254b31bf1caee1f3ad1407e477ea7c304c8c8f3b
Author: marcin mikołajczak <git@mkljczk.pl>
Date: Sun, 30 Apr 2023 17:33:11 +0200
Expose markup configuration in InstanceView
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex
@@ -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