Expose the post formats in /api/v1/instance
authorMark Felder <feld@FreeBSD.org>
Fri, 17 Jul 2020 15:45:41 +0000 (10:45 -0500)
committerMark Felder <feld@FreeBSD.org>
Fri, 17 Jul 2020 15:45:41 +0000 (10:45 -0500)
CHANGELOG.md
docs/API/differences_in_mastoapi_responses.md
lib/pleroma/web/mastodon_api/views/instance_view.ex

index a02f28241b202c394a79dd7d83b2a4b8534b7b7d..75488f026949185417b57569828102a94488df35 100644 (file)
@@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
   has been simplified down to `block_from_strangers`.
 - **Breaking:** Notification Settings API option for hiding push notification
   contents has been renamed to `hide_notification_contents`
+- Mastodon API: Added `pleroma.metadata.post_formats` to /api/v1/instance
 </details>
 
 <details>
index c4a9c6dade9aeadfe12140475e359091151623ce..38865dc68a8b4393a7c40d23eceacebf1a7bf434 100644 (file)
@@ -236,6 +236,7 @@ Has theses additional parameters (which are the same as in Pleroma-API):
 - `pleroma.metadata.features`: A list of supported features
 - `pleroma.metadata.federation`: The federation restrictions of this instance
 - `pleroma.metadata.fields_limits`: A list of values detailing the length and count limitation for various instance-configurable fields.
+- `pleroma.metadata.post_formats`: A list of the allowed post format types
 - `vapid_public_key`: The public key needed for push messages
 
 ## Markers
index 5deb0d7ed60ba4f71edfdf49a97e1dbb7a7fad98..cd3bc7f00c525f5413a6be3e38613dc44e3b9167 100644 (file)
@@ -41,7 +41,8 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
           account_activation_required: Keyword.get(instance, :account_activation_required),
           features: features(),
           federation: federation(),
-          fields_limits: fields_limits()
+          fields_limits: fields_limits(),
+          post_formats: Config.get([:instance, :allowed_post_formats])
         },
         vapid_public_key: Keyword.get(Pleroma.Web.Push.vapid_config(), :public_key)
       }