MSC3947: Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users#3947
Conversation
…Only Homeserver-Local Users Signed-off-by: Marcus Müller <marcus@hostalia.de>
Signed-off-by: Marcus Müller <marcus@hostalia.de>
Signed-off-by: Marcus Müller <marcus@hostalia.de>
| { | ||
| limit: integer The maximum number of results to return. Defaults to 10. | ||
| search_term*: string The term to search for | ||
| exclude_sources: integer Whether to exclude no users from directory search (0), |
There was a problem hiding this comment.
In general, in Matrix, we don't use integers to represent enumerations. We usually use a set of string values instead. e.g. "exclude_sources" can be one of "remote", "local", or "none", defaulting to "none".
While this doesn't mean that endpoints can't use integers, there would need to be a compelling reason for an endpoint to do so, and I don't think that the reason for using an integer is particularly strong in this case. If you want to allow for the possibility of multiple things to be excluded in the future, the parameter can be made to be an array of things to exclude.
There was a problem hiding this comment.
oh, I wasn't aware of that convention. "none" makes little sense, IMHO: If it's a list / set of strings, just keep it empty.
| `Firstname:myownhomeserver.com`, `Firstname:local` to be decomposed into a | ||
| search term and a term that specifies that only the local users should be | ||
| searched. | ||
|
|
There was a problem hiding this comment.
Sorry, I don't understand. Not having written an implementation so far, I did not add that section.
There was a problem hiding this comment.
You don't need to have written any implementation yet to define an unstable prefix. But you should define an unstable prefix for use by anyone who does want to write an implementation.
Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users
Pull Request Checklist