-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Open
Labels
area/web interfaceRelated to the Mastodon web interfaceRelated to the Mastodon web interfacestatus/to triageThis issue needs to be triagedThis issue needs to be triaged
Description
Steps to reproduce the problem
- Open https://frikiverse.zone/@kergozh
- They are the owner of that server, observe they have an "Owner" role badge on their profile
- Use the API to fetch their account info from their server (https://frikiverse.zone/api/v1/accounts/109270219674177937)
Nothing special about that server or that account, it's just the first owner account I noticed.
Expected behaviour
A role
object with a highlighted
value set to true
Actual behaviour
The role
object exists, but has no highlighted
property
Detailed description
According to the docs, highlight
is for "Whether the role is publicly visible as a badge on user profiles." (https://docs.joinmastodon.org/entities/Role/#highlighted)
The relevant bit of the JSON response for that account is:
"roles": [
{
"id": "3",
"name": "Owner",
"color": ""
}
],
I see two problems with that.
- There's no
"highlighted": true
, so the web UI should not be displaying the badge. - There's no
"highlighted"
entry full-stop; as far as I can tell there's nothing in the JSON spec that defines how parsers are supposed to handle missing (boolean) fields (treat as null, true, false, raise an error). Either the field should always be included, or the documentation should be updated to note how clients are supposed to handle missing fields.
Mastodon instance
Mastodon version
4.2.3
Browser name and version
Firefox 120.0.1
Operating system
Windows 11
Technical details
No response
Metadata
Metadata
Assignees
Labels
area/web interfaceRelated to the Mastodon web interfaceRelated to the Mastodon web interfacestatus/to triageThis issue needs to be triagedThis issue needs to be triaged