Skip to content

MSC3947: Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users#3947

Open
marcusmueller wants to merge 3 commits into
matrix-org:mainfrom
marcusmueller:restricting-user-directory-search
Open

MSC3947: Allow Clients to Request Searching the User Directory Constrained to Only Homeserver-Local Users#3947
marcusmueller wants to merge 3 commits into
matrix-org:mainfrom
marcusmueller:restricting-user-directory-search

Conversation

@marcusmueller

@marcusmueller marcusmueller commented Dec 11, 2022

Copy link
Copy Markdown

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
Comment thread proposals/3947-restricting-user-directory-search.md Outdated
@turt2live turt2live added proposal A matrix spec change proposal. Process state. A-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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

A-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. Process state.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants