-
Notifications
You must be signed in to change notification settings - Fork 397
MSC3947: Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users #3947
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
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be an "Unstable Prefix" section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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