Skip to content

Instance activity API uses varying JSON types for integers #6197

@TheKinrar

Description

@TheKinrar

/api/v1/instance/activity returns a JSON where week, statuses and registrations are strings while logins is a number. Also, statuses and registrations default to zero as a number which is incoherent.

In my opinion, week as a string is justified as we should not go beyond 32 bits signed integers and Mastodon instances have to work in 2038. Instance may one day have billions of statuses per week, that's not impossible, so I think statuses should stay a string too.
However keeping these integer defaults and logins as a number is quite strange I think.

PR to follow.


  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • This bug happens on a tagged release and not on master (If you're a user, don't worry about this).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions