You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
The /search endpoint can include state events in the response. The spec says about the "state" field in the response:
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:
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:
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.
The text was updated successfully, but these errors were encountered: