[bug] URI in instance information should be domain, not URL #545

Open
opened 2023-05-25 11:10:08 +00:00 by zimpenfish · 3 comments

Your setup

From source

Extra details

Arch Linux

Version

ef279ac53f

PostgreSQL version

14.6

What were you trying to do?

Get the domain name from the instance information.

> curl -s https://social.rjp.is/api/v1/instance | jq '.uri'
"https://social.rjp.is"

What did you expect to happen?

The domain name to be returned in the uri key.

> curl -s https://octodon.social/api/v1/instance | jq '.uri'
"octodon.social"

What actually happened?

Akkoma returns the endpoint URL in the uri key instead of the domain name as defined in the spec -
https://docs.joinmastodon.org/entities/V1_Instance/#uri

> curl -s https://social.rjp.is/api/v1/instance | jq '.uri'
"https://social.rjp.is"

toot is mildly confused by this because it uses this key to store instance information in its configuration file and then cannot find it because @x@y.z obviously won't match https://y.z.

Logs

No response

Severity

I cannot use it as easily as I'd like

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup From source ### Extra details Arch Linux ### Version ef279ac53fecd684281b9e5df13a3e082c589aac ### PostgreSQL version 14.6 ### What were you trying to do? Get the domain name from the instance information. ``` > curl -s https://social.rjp.is/api/v1/instance | jq '.uri' "https://social.rjp.is" ``` ### What did you expect to happen? The domain name to be returned in the `uri` key. ``` > curl -s https://octodon.social/api/v1/instance | jq '.uri' "octodon.social" ``` ### What actually happened? Akkoma returns the endpoint URL in the `uri` key instead of the domain name as defined in the spec - https://docs.joinmastodon.org/entities/V1_Instance/#uri ``` > curl -s https://social.rjp.is/api/v1/instance | jq '.uri' "https://social.rjp.is" ``` `toot` is mildly confused by this because it uses this key to store instance information in its configuration file and then cannot find it because `@x@y.z` obviously won't match `https://y.z`. ### Logs _No response_ ### Severity I cannot use it as easily as I'd like ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
zimpenfish added the
bug
label 2023-05-25 11:10:08 +00:00

this would be a bug in the client

https://mastodon.social/@Gargron/110429305552168098

apparently this is an old endpoint that masto doesn't even use anymore

this would be a bug in the client https://mastodon.social/@Gargron/110429305552168098 apparently this is an old endpoint that masto doesn't even use anymore
Author

Sure but since Akkoma doesn't (as best I can tell from the source at 9e9cf58fdf) support the /api/v2/instance call, what is a client supposed to do here? Just throw their hands up and refuse to talk to Akkoma instances because the deprecated call isn't spec-compliant but the replacement isn't implemented?

Sure but since Akkoma doesn't (as best I can tell from the source at 9e9cf58fdf) support the `/api/v2/instance` call, what is a client supposed to do here? Just throw their hands up and refuse to talk to Akkoma instances because the deprecated call isn't spec-compliant but the replacement isn't implemented?

it's supposed to do the sensible thing and treat URIs as URIs

it's supposed to do the sensible thing and treat URIs as URIs
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#545
No description provided.