Fediseer / fediseer

Something something stop bad instances
GNU Affero General Public License v3.0
50 stars 6 forks source link

Admin account retrieval doesn't work on Firefish #55

Closed interru closed 10 months ago

interru commented 10 months ago

Firefish requires credentials for the users API.

See: https://firefish.social/api-doc#operation/users Change was introduced with the following commit: https://git.joinfirefish.org/firefish/firefish/-/commit/4c9dabe7

Therefore, fediseer fails to retrieve an admin account and seems to use admin as fallback.

Now the question: Why not add a field/parameter where you can specify the account and check the admin status instead of retrieving the user list?

Example:

$ curl -s 'https://hooves.social/api/users/show' \
  -H 'accept: */*' \
  -H 'content-type: application/json;charset=UTF-8' \
  --data-raw '{"username":"interru"}' | jq '.isAdmin'
true
db0 commented 10 months ago

Not every software exposes the admins the same way. For example mastodon doesn't have an indication that a user is an admin. but if it works for firefish, we can use it.