Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/_matrix/client/r0/rooms/{roomId}/joined_members shouldn't exist. #266

Open
jevolk opened this issue Feb 20, 2018 · 2 comments
Open

/_matrix/client/r0/rooms/{roomId}/joined_members shouldn't exist. #266

jevolk opened this issue Feb 20, 2018 · 2 comments
Labels
A-Client-Server Issues affecting the CS API wart A point where the protocol is inconsistent or inelegant

Comments

@jevolk
Copy link
Contributor

jevolk commented Feb 20, 2018

Inspired by matrix-org/matrix-spec-proposals#734 and introduced sneaked in by matrix-org/matrix-spec-proposals#999 and canonized in the r0.3.0 release of the specification under 6.3.5: the endpoint:

GET /_matrix/client/r0/rooms/{roomId}/joined_members

should instead be a query parameter to 6.3.4:

GET /_matrix/client/r0/rooms/{roomId}/members

taking the exact form of:

GET /_matrix/client/r0/rooms/{roomId}/members?membership=join

Consider these significant defects:

  1. This endpoint has no potential to support other membership states. It is arguably just as useful, if not more useful to efficiently request a room's ban list as it is to request the join list. With this direction, entirely new endpoints have to be created for every membership state.

  2. The content returned from this endpoint has a radically different format from the content returned from the /members endpoint. The latter returns an array of events. This endpoint returns a map of mxid's to some event content fields. Intuitively, this endpoint should return an array of events where the membership state is join. Standard filters can be used to slim down such events for efficiency at the discretion of the client.

  3. "joined" is not a membership state. The endpoint along with the root object returned in the content is named "joined" -- this is correct english, but technically useless. Computers don't convert tense. Though I suppose to be consistent we could continue in this direction with /leaved_members

@richvdh
Copy link
Member

richvdh commented Feb 20, 2018

the different response format was a deliberate choice, to reduce load on the server, iirc.

I can't disagree with any of this, though.

@Half-Shot
Copy link
Contributor

Half-Shot commented May 21, 2018

Yes this does seem kind of rushed. And actually now I think about it I could have done with an invited list/banned list/left list for bridges :(

@benparsons benparsons added the wart A point where the protocol is inconsistent or inelegant label May 21, 2018
@turt2live turt2live added the A-Client-Server Issues affecting the CS API label Sep 6, 2018
@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API wart A point where the protocol is inconsistent or inelegant
Projects
None yet
Development

No branches or pull requests

5 participants