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

Clarification of /messages response format #3380

Closed
pizzapim opened this issue Sep 6, 2021 · 0 comments · Fixed by #3658
Closed

Clarification of /messages response format #3380

pizzapim opened this issue Sep 6, 2021 · 0 comments · Fixed by #3658
Labels
clarification An area where the spec could do with being more explicit

Comments

@pizzapim
Copy link

pizzapim commented Sep 6, 2021

Link to problem area:
https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-rooms-roomid-messages

Issue
The response format for the /messages endpoint says that 'chunk' only contains a list of non-state events ([RoomEvent]), but 'chunk' can also contain state events. I suggest changing it to '[RoomEvent or RoomStateEvent]'.

@pizzapim pizzapim added the clarification An area where the spec could do with being more explicit label Sep 6, 2021
richvdh added a commit that referenced this issue Feb 1, 2022
Fixes #3305 
Fixes #3380
 
The idea here is to better distinguish between a 'raw' event (as we send over the wire), and the 
'serialised' format, as sent in responses to the C-S api and in `PUT /_matrix/app/v1/transactions/{txnId}`.

It's made more complicated by the fact that there are _two_ serialisation formats, one used by `/sync`
and `/notifications`, and one by everything else (the difference being whether `room_id` is included).

In an ideal world, we wouldn't repeat `SerialisedEvent` every time it's used, and instead just link to the
first reference, but that's a job for another day.

Another job for another day is to get rid of things like `sync_state_event.yaml` (which is now used
only in one place, so should be inlined.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the spec could do with being more explicit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant