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

Search/context endpoint doesn't mention a user_id #1217

Closed
S7evinK opened this issue Aug 26, 2022 · 3 comments
Closed

Search/context endpoint doesn't mention a user_id #1217

S7evinK opened this issue Aug 26, 2022 · 3 comments
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@S7evinK
Copy link

S7evinK commented Aug 26, 2022

Link to problem area:
https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3search
https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3roomsroomidcontexteventid

Issue
Question came up in matrix-org/sytest#1281
The /search endpoint doesn't specify a user_id in any of the response objects, yet Sytest is checking for the existence of this field.
I couldn't find user_id in any older spec version, so the question is what's the correct behavior. Do we need user_id (as currently returned by Synapse in search_categories.room_events.results[] and search_categories.room_events.results[].context.events_before[] (and events_after), or don't we need it?

Same question for /context returned values - Synapse returns a user_id in ClientEvent, while the spec doesn't mention it.

@S7evinK S7evinK added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Aug 26, 2022
@richvdh
Copy link
Member

richvdh commented Aug 26, 2022

Looking harder at this, it sounds like a (known) Synapse bug: matrix-org/synapse#7925

@richvdh
Copy link
Member

richvdh commented Aug 26, 2022

(If you go back far enough, it does exist in the spec. But this is definitely a synapse bug nowadays.)

@richvdh richvdh closed this as completed Aug 26, 2022
@turt2live
Copy link
Member

(for keywords: this will be an event format issue, as we're on v2 events at a minimum right now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

3 participants