-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Int vs Bool confusion for the fields returned by the users admin API #16733
Comments
In the past we've seen this sort of int-bool confusion happen on SQLite, because:
I think what's happened here is different. Take
|
Duplicate to #13519 |
Maybe related, but not a duplicate I think, since this behavior is new: |
It was probably one of the removal of |
Those values being |
Description
The List Accounts User Admin API (
GET /_synapse/admin/v2/users
) used to be returning certain boolean-like fields as integers (e.g."is_guest": 0
).The v1.97.0 documentation page shows examples that use integers (e.g.
"is_guest": 0
) while actually saying something like:This is confusing - is it an integer or a boolean that we're receiving?
However, going back to the documentation for an ancient version (like v1.35.0), one can read the same exact thing.
On that old version, I believe the API was definitely returning integers, not booleans.
However, on v1.97.0 (at least.. possibly even earlier), the API seems to have started returning booleans. It may be an accidental change. It may have been announced in some release notes and I may have missed it.
Nevertheless, I believe the documentation page is confusing (is it a bool or an integer?) and potentially out of date now - it needs fixes.
Related to: devture/matrix-corporal#30
Steps to reproduce
GET /_synapse/admin/v2/users
API with an admin tokenis_guest
,admin
,deactivated
,shadow_banned
,approved
,erased
,locked
) all a boolean type of value (false
ortrue
). On previous versions, integers (0
,1
) were used.Homeserver
another homeserver
Synapse Version
1.97.0
Installation Method
Docker (matrixdotorg/synapse)
Database
PostgreSQL (irrelevant)
Workers
Multiple workers
Platform
VM + containers
Configuration
No response
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: