Mastodon API counts deleted accounts
How to reproduce
Create a user. The user_count
found via /api/v1/instance
will then increase by 1. (e.g, from 2 to 3)
Run mix pleroma.user rm username
, the user_count
does not drop back down after the user has been "deleted".
Expected behavior
The user_count
returned by the mastodon API should drop by 1 when a user is "deleted".
Running rm
on a user seems to only set info -> deactivated
to true
after deleting all of the user's content. As such, the mastodon API cannot tell the difference between an account that has simply been locked, and one that's supposed to no longer exist. I assume they remain in the database to prevent immediate reuse of the username, but it still leads to a skewed user count the way it's currently marked, or how the mastodon API reads the database entries.