Add short_description to mastodon v1 instance api response. #821
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#821
Loading…
Reference in a new issue
No description provided.
Delete branch "paulyd/akkoma:add_short_description_to_masto_api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context:
Some third party client applications are expecting the
short_description
key in the v1 instance response.See this issue:
https://github.com/Dimillian/IceCubesApp/issues/16
and this issue
https://github.com/Dimillian/IceCubesApp/issues/2105#issuecomment-2231466416
short_description
is a required field as per the masto api docs.https://docs.joinmastodon.org/entities/V1_Instance/#short_description
Insecurities / questions:
1️⃣ According to the mastodon docs,
description
is meant to allow html,short_description
is meant to be plain text. Should we force html safe encode the short_description? Or would we prefer to actually add an instance config for a text onlyshort_description
?2️⃣ I don't have a way to test this locally with icecubes, so I am not convinced this actually fixes the integration. I realize keeping pace with the mastodon api is a moving target, but it seemed easy enough to try. 🤷
Thanks, the thing is *oma’s MastoAPI was brought up a fair bit ago matching Mastodon 2.7 (January 2019). Random newer bits were added when useful or reported like here, but no comprehensive upgrade occured and we still advertise as version 2.7.2. *(Just compiling a list of which API bits changed per Mastodon version unfortunately isn’t that straightforward already; help appreciated)
For reference
short_description
was added in Mastodon 2.9.2 (June 2019).Technically we could add a another HTML scrubber config converting everything to plain text only, but since this destroys layout a separate config will still be desireable sometimes. Imho it seems fine to default
short_description
todescription
, but if specified use a newshort_description
config instead.When you add this, don't forget to also create it in
config/description.exs
(search for:description
for the existing setting) and to update docs indocs/docs/configuration/cheatsheet.md
.PR is all good, i can patch up the docs/default config if needed
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.