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

Clarify why /_matrix/federation/v1/event/ returns an array #2093

Closed
JJJollyjim opened this issue Jun 6, 2019 · 2 comments · Fixed by #2095
Closed

Clarify why /_matrix/federation/v1/event/ returns an array #2093

JJJollyjim opened this issue Jun 6, 2019 · 2 comments · Fixed by #2095
Assignees
Labels
clarification An area where the spec could do with being more explicit s2s Server-to-Server API (federation)

Comments

@JJJollyjim
Copy link
Contributor

Apparently GET /_matrix/federation/v1/event/{eventId} "Retrieves a single event".

The response contains an array pdus which "Must not include more than 50 PDUs".

May it ever include more than one PDU?

What if the same eventId is used in multiple rooms?

@JJJollyjim
Copy link
Contributor Author

JJJollyjim commented Jun 6, 2019

I'm pretty sure the answer is "it always returns one and event IDs duplicated between rooms are undefined behavior".

In that case the field description text in the response schema should probably be changed to something like "List containing a single persistent update to a room. Note that events have a different format depending on the room version - check the room version specification for precise event formats.".

@turt2live
Copy link
Member

It returns a Transaction object, which awkwardly has a schema written for the /transaction endpoint. I believe we have words somewhere to say it "must only have 1 event", however this may have been lost in translation.

@turt2live turt2live added clarification An area where the spec could do with being more explicit s2s Server-to-Server API (federation) labels Jun 6, 2019
@turt2live turt2live added this to To add to spec in Matrix 1.0 workflow via automation Jun 6, 2019
@turt2live turt2live self-assigned this Jun 6, 2019
@turt2live turt2live moved this from To add to spec to In progress in Matrix 1.0 workflow Jun 6, 2019
Matrix 1.0 workflow automation moved this from In progress to Done Jun 6, 2019
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 s2s Server-to-Server API (federation)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants