Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marcusmueller
Copy link

@marcusmueller marcusmueller commented Dec 11, 2022

Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users

Name Title Rendered View
MSC3947 Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users Link

Pull Request Checklist

  • Pull request includes a sign off
  • Update the title and file name of your proposal to match this PR's number (after opening).
  • Pull request includes a 'Rendered' link above.

…Only Homeserver-Local Users

Signed-off-by: Marcus Müller <marcus@hostalia.de>
Signed-off-by: Marcus Müller <marcus@hostalia.de>
@turt2live turt2live changed the title Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users MSC3947: Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users Dec 12, 2022
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Dec 12, 2022
Signed-off-by: Marcus Müller <marcus@hostalia.de>
@marcusmueller marcusmueller marked this pull request as ready for review December 12, 2022 20:29
{
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),
Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

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

Copy link
Author

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants