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

Clarify the homeserver's behaviour for user searching #1569

Merged
merged 5 commits into from Aug 31, 2018

Conversation

3 participants
@turt2live
Member

turt2live commented Aug 27, 2018

Rendered: see 'docs' status check


The homeserver can implement its own algorithm, but is suggested to ensure the requesting user can reasonably see the other users.

The text is intentionally left vague for whether or not the API is local users only to give the homeserver some flexibility in this area.

General cleanup is also included in this commit.

Fixes #1108

Clarify the homeserver's behaviour for user searching
The homeserver can implement its own algorithm, but is suggested to ensure the requesting user can reasonably see the other users.

The text is intentionally left vague for whether or not the API is local users only to give the homeserver some flexibility in this area.

General cleanup is also included in this commit.

Fixes #1108

@turt2live turt2live requested a review from matrix-org/spec-core-team Aug 27, 2018

@turt2live turt2live added this to In review (just the PRs) in August 2018 r0 via automation Aug 27, 2018

It searches user ID and displayname case-insensitively for users that you share a room with or that are in public rooms.
Performs a search for users on the homeserver. The homeserver may
determine which subset of users are searched, however the homeserver
is encouraged to only consider users the requesting user shares a

This comment has been minimized.

@ara4n

ara4n Aug 28, 2018

Member

perhaps "the homeserver MUST include the users the requesting user shares a room with and those who reside in public rooms"? Otherwise it's going to be very unpredictable and flakey.

This comment has been minimized.

@turt2live

turt2live Aug 28, 2018

Member

Synapse has a config flag for searching all users regardless of those requirements though - seems worthwhile to support that.

This comment has been minimized.

@ara4n

ara4n Aug 28, 2018

Member

absolutely. i'm just saying that the minimum it MUST support is the shared-room-and-public-room users.

room with and those who reside in public rooms.
The search is performed case-insensitively on user IDs and display
names.

This comment has been minimized.

@ara4n

ara4n Aug 28, 2018

Member

We need to specify a collation too (particularly relevant for DINSIC trying to look for Jérôme and failing to match jerome). Synapse currently doesn't do this, and it only works for DINSIC because it happens their user IDs are based on email addresses which have already flattened the charset to ASCII.

I suggest: "...preferably using a collation determined based on the searching user's locale as determined by their Accept-Language header".

In practice I think this is a royal pain to implement on postgres, where the FTS indexes have to be created in a single locale. (The workaround for DINSIC if needed will be to manually rebuild the indices on a French locale).

@ara4n

I think it's a bit too loose - have suggested to tighten it up, and mention collations.

@turt2live turt2live requested a review from ara4n Aug 28, 2018

@turt2live

This comment has been minimized.

Member

turt2live commented Aug 30, 2018

@ara4n this should be updated - when you get a chance, please take a look.

@richvdh

lgtm

@richvdh richvdh requested review from ara4n and removed request for ara4n Aug 31, 2018

requested changes made

August 2018 r0 automation moved this from In review (just the PRs) to Reviewer approved Aug 31, 2018

@turt2live turt2live merged commit 73736d4 into matrix-org:master Aug 31, 2018

7 checks passed

ci/circleci: build-dev-scripts Your tests passed on CircleCI!
Details
ci/circleci: build-docs Your tests passed on CircleCI!
Details
ci/circleci: build-swagger Your tests passed on CircleCI!
Details
ci/circleci: check-docs Your tests passed on CircleCI!
Details
ci/circleci: validate-docs Your tests passed on CircleCI!
Details
docs Click details to preview the HTML documentation.
Details
swagger Click to preview the swagger build.
Details

August 2018 r0 automation moved this from Reviewer approved to Done (this list will be incomplete) Aug 31, 2018

@turt2live turt2live deleted the turt2live:travis/c2s/user-directory branch Aug 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment