From 890ac8ff86e28af464f56fc023d9d7e2f4bc2f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 30 Apr 2023 17:33:11 +0200 Subject: [PATCH 1/2] Expose markup configuration in InstanceView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- lib/pleroma/web/mastodon_api/views/instance_view.ex | 11 ++++++++++- 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 index 4b0480f66..af6a63e92 100644 --- 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 From d1b9d03302b4f8ea83174d0934f71360709d7585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Miko=C5=82ajczyk?= Date: Fri, 28 Mar 2025 17:00:36 +0100 Subject: [PATCH 2/2] update changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- changelog.d/expose-markup-configuration.add | 1 + lib/pleroma/web/mastodon_api/views/instance_view.ex | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/expose-markup-configuration.add diff --git a/changelog.d/expose-markup-configuration.add b/changelog.d/expose-markup-configuration.add new file mode 100644 index 000000000..8c7f35697 --- /dev/null +++ b/changelog.d/expose-markup-configuration.add @@ -0,0 +1 @@ +Expose markup configuration in InstanceView diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex index af6a63e92..848bf1a22 100644 --- a/lib/pleroma/web/mastodon_api/views/instance_view.ex +++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex @@ -323,7 +323,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do } end - defp markup() do + defp markup do %{ allow_inline_images: Config.get([:markup, :allow_inline_images]), allow_headings: Config.get([:markup, :allow_headings]),