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

Spec does not explain the values of string keys in the /search's response #773

Closed
jimmycuadra opened this issue Dec 31, 2016 · 0 comments
Closed
Assignees
Labels
spec-omission implemented but not currently specified

Comments

@jimmycuadra
Copy link
Contributor

jimmycuadra commented Dec 31, 2016

The /search endpoint can include state events in the response. The spec says about the "state" field in the response:

Parameter Type Description
state {string: array} The current state for every room in the results. This is included if the request had the include_state key set with a value of true.

But it doesn't say what the string key represents or what the values in the array are. The example does not include state so there's no way to infer it from example either.

When groupings are requested, the "Room Event Results" includes a groups field:

Parameter Type Description
groups {string: {string: Group Value}} Any groups that were requested.

Again, the meanings of the two string keys are not explained. From the example, it appears that the outer key corresponds to the group name that was supplied for the grouping's "key" field, but it should be stated explicitly. The example also shows a room ID for the inner key, which would make sense for results grouped by "room_id". There's no explanation of how the structure changes if a group keyed by "sender" is requested. Does the inner string key become the user ID of the sender of each group value?

Similarly, the string key of the "Event Context" object's "profile_info" field in the response is not explained, nor are there any examples:

Parameter Type Description
profile_info {string: User Profile} The historic profile information of the users that sent the events returned.

Is it a user ID? That would make the most sense, since the value of the field does not contain a user ID. But in that case, how do you know which events those users are associated with? The key would need to be an event ID to get that information.

@jimmycuadra jimmycuadra changed the title Spec does not explain /search's "state" field Spec does not explain the values of string keys in the /search's response Dec 31, 2016
@richvdh richvdh added the spec-omission implemented but not currently specified label Oct 16, 2017
@turt2live turt2live self-assigned this Jul 10, 2018
turt2live added a commit to turt2live/matrix-doc that referenced this issue Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec-omission implemented but not currently specified
Projects
None yet
Development

No branches or pull requests

3 participants