aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-07-17 10:45:41 -0500
committerMark Felder <feld@FreeBSD.org>2020-07-17 10:45:41 -0500
commit20a496d2cbea18c563694c7026c0e951e99cfc3b (patch)
treecad5e473e45efad117d0996c9a16f608d4a286a3
parent64b4de4af10ebac778b8069d88ef7515a53dfae5 (diff)
downloadpleroma-20a496d2cbea18c563694c7026c0e951e99cfc3b.tar.gz
Expose the post formats in /api/v1/instance
-rw-r--r--CHANGELOG.md1
-rw-r--r--docs/API/differences_in_mastoapi_responses.md1
-rw-r--r--lib/pleroma/web/mastodon_api/views/instance_view.ex3
3 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a02f28241..75488f026 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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>
diff --git a/docs/API/differences_in_mastoapi_responses.md b/docs/API/differences_in_mastoapi_responses.md
index c4a9c6dad..38865dc68 100644
--- a/docs/API/differences_in_mastoapi_responses.md
+++ b/docs/API/differences_in_mastoapi_responses.md
@@ -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
diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex
index 5deb0d7ed..cd3bc7f00 100644
--- a/lib/pleroma/web/mastodon_api/views/instance_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex
@@ -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)
}