[feat] Adding configuration property in /api/v1/instance endpoint #696

Open
opened 2024-02-18 06:32:31 +00:00 by shuuji3 · 1 comment

The idea

Akkoma's instance endpoint (for example, https://seafoam.space/api/v1/instance) returns max_toot_chars as the maximum characters of the toot now, while Mastodon has configuration.statuses.max_characters property for that number (ref. https://mastodon.social/api/v1/instance).

It would be nice for Akkoma's endpoint can return the same configuration property in /api/v1/instance endpoint.

https://seafoam.space/api/v1/instance

{
  ...
  "max_toot_chars": 5000,
  ...
}

https://mastodon.social/api/v1/instance

{
  ...
  "configuration": {
    "accounts": {
      "max_featured_tags": 10
    },
    "statuses": {
      "max_characters": 500,
      "max_media_attachments": 4,
      "characters_reserved_per_url": 23
    },
  ...
}

The reasoning

I'm working on the Elk client and Akkoma users reported the issue about the maximum characters: https://github.com/elk-zone/elk/issues/2573.

If the Akkoma has a compatible response on the endpoint, it would help improve the interoperability with other tools too. Thanks!

Have you searched for this feature request?

  • I have double-checked and have not found this feature request mentioned anywhere.
  • This feature is related to the Akkoma backend specifically, and not pleroma-fe.
### The idea Akkoma's instance endpoint (for example, https://seafoam.space/api/v1/instance) returns `max_toot_chars` as the maximum characters of the toot now, while Mastodon has `configuration.statuses.max_characters` property for that number (ref. https://mastodon.social/api/v1/instance). It would be nice for Akkoma's endpoint can return the same `configuration` property in `/api/v1/instance` endpoint. https://seafoam.space/api/v1/instance ```json5 { ... "max_toot_chars": 5000, ... } ``` https://mastodon.social/api/v1/instance ```json5 { ... "configuration": { "accounts": { "max_featured_tags": 10 }, "statuses": { "max_characters": 500, "max_media_attachments": 4, "characters_reserved_per_url": 23 }, ... } ``` ### The reasoning I'm working on the Elk client and Akkoma users reported the issue about the maximum characters: https://github.com/elk-zone/elk/issues/2573. If the Akkoma has a compatible response on the endpoint, it would help improve the interoperability with other tools too. Thanks! ### Have you searched for this feature request? - [x] I have double-checked and have not found this feature request mentioned anywhere. - [x] This feature is related to the Akkoma backend specifically, and not pleroma-fe.
shuuji3 added the
feature request
label 2024-02-18 06:32:31 +00:00
Member

Akkoma's instance endpoint ([...]) returns max_toot_chars as the maximum characters of the toot now, while Mastodon has configuration.statuses.max_characters property for that number

Although Akkoma only claims compatibility with Mastodon 2.7.2, this makes sense to me and I guess exposing it also the Mastodon-way wouldn’t be to hard or too much bloat (but my guess has no authority), but just for reference for the curious:

*oma added max_toot_chars on 2018-11-06 (and most other properties in a misnamed commit on 2019-10-02).
According to its own docs Mastodon added configuration properties in 3.4.2 which was tagged on 2021-11-06. It’s literally Mastodon’s API afterall so they don’t need to consider how others already extended it, but funny still

> Akkoma's instance endpoint ([...]) returns `max_toot_chars` as the maximum characters of the toot now, while Mastodon has `configuration.statuses.max_characters` property for that number Although Akkoma only claims compatibility with Mastodon 2.7.2, this makes sense to me and I guess exposing it also the Mastodon-way wouldn’t be to hard or too much bloat (but my guess has no authority), but just for reference for the curious: *oma added `max_toot_chars` on [2018-11-06](https://akkoma.dev/AkkomaGang/akkoma/commit/5bb88fd1749931e755157760ec833c5d50ebb8c8) *(and most other properties in a misnamed commit on [2019-10-02](https://akkoma.dev/AkkomaGang/akkoma/commit/1255ec888d5f1a186b499bf9e5c23c8c7332ed4d#diff-21f28e7af6be02897f1b328a0cbecfae01f66e95))*. According to its own docs Mastodon added `configuration` properties in 3.4.2 which was tagged on 2021-11-06. It’s literally Mastodon’s API afterall so they don’t need to consider how others already extended it, but funny still
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#696
No description provided.