mastodon / mastodon/documentation

`Tag.id` may be empty and is not documented as such

Open
#1,870 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
1.7k
Forks
978
PR merge metrics
No merged PRs in 30d

Description

https://docs.joinmastodon.org/entities/Tag/#id is documented as "ID of the hashtag in the database. Useful for constructing URLs for the moderation tools & Admin API." and "String (cast from an integer but not guaranteed to be a number)".

This may be the empty string, which is not documented anywhere. For example, send a request for non-existent tag (https://mastodon.social/api/v1/tags/pO8WHFw3JSGvLAt0iyQ08g) and you get back:

{
    "id": "",
    "name": "pO8WHFw3JSGvLAt0iyQ08g",
    "url": "https://mastodon.social/tags/po8whfw3jsgvlat0iyq08g",
    "history": [
        {
            "day": "1773187200",
            "accounts": "0",
            "uses": "0"
        },
// ...
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked Tag.id documentation page and compare its stated type and description with the supplied response for a non-existent tag. Update the documentation to state that id may be an empty string, then verify the Tag entity page reflects that behavior.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.