Add short_description to mastodon v1 instance api response.
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/build-arm64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending

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
This commit is contained in:
Paul Dawson 2024-07-17 20:50:22 -05:00
parent 3ff0f46b9f
commit 312ce5a1bf
2 changed files with 2 additions and 0 deletions

View file

@ -17,6 +17,7 @@ def render("show.json", _) do
uri: Pleroma.Web.Endpoint.url(),
title: Keyword.get(instance, :name),
description: Keyword.get(instance, :description),
short_description: Keyword.get(instance, :description),
version: "#{@mastodon_api_level} (compatible; #{Pleroma.Application.named_version()})",
email: Keyword.get(instance, :email),
urls: %{

View file

@ -23,6 +23,7 @@ test "get instance information", %{conn: conn} do
"uri" => _,
"title" => _,
"description" => _,
"short_description" => _,
"version" => _,
"email" => from_config_email,
"urls" => %{