Skip to content

Add the ability to exclude remote users in user directory search results #18300

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

Merged
merged 8 commits into from
May 2, 2025

Conversation

wrjlewis
Copy link
Contributor

@wrjlewis wrjlewis commented Mar 31, 2025

This change adds a new configuration user_directory.exclude_remote_users, which defaults to False.
When set to True, remote users will not appear in user directory search results.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

@github-actions github-actions bot deployed to PR Documentation Preview March 31, 2025 12:56 Active
@github-actions github-actions bot deployed to PR Documentation Preview March 31, 2025 13:00 Active
@wrjlewis wrjlewis changed the title Add the ability to exclude remote users in a user directory search Add the ability to exclude remote users in user directory search results Mar 31, 2025
@wrjlewis
Copy link
Contributor Author

This would fix #12958 and semi-relevant to #5301

@wrjlewis wrjlewis marked this pull request as ready for review March 31, 2025 13:15
@wrjlewis wrjlewis requested a review from a team as a code owner March 31, 2025 13:15
@github-actions github-actions bot deployed to PR Documentation Preview April 1, 2025 12:48 Active
@github-actions github-actions bot deployed to PR Documentation Preview April 1, 2025 14:23 Active
@wrjlewis
Copy link
Contributor Author

wrjlewis commented Apr 1, 2025

I think the failing tests are due to them being flakey. EDIT: passing.

Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small suggestions and a potential perf optimisation below.

Thanks for contributing. This looks like a useful feature for smaller homeservers!

wrjlewis and others added 3 commits May 2, 2025 10:47
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
@github-actions github-actions bot deployed to PR Documentation Preview May 2, 2025 13:15 Active
@wrjlewis wrjlewis requested a review from anoadragon453 May 2, 2025 13:16
@github-actions github-actions bot deployed to PR Documentation Preview May 2, 2025 13:18 Active
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the requested changes. This looks good to merge!

@wrjlewis wrjlewis merged commit fe8bb62 into develop May 2, 2025
41 checks passed
@wrjlewis wrjlewis deleted the user_dir_return_local_users_only branch May 2, 2025 14:38
@3nprob
Copy link
Contributor

3nprob commented May 2, 2025

I think the failing tests are due to them being flakey. EDIT: passing.

@wrjlewis Um, looks like tests started failing on develop after merging this - is the flakiness new?

https://github.com/element-hq/synapse/actions/runs/14797357096/job/41547797957

Perhaps this could be reverted until the test results are more consistent?

3nprob added a commit to 3nprob/synapse-dev that referenced this pull request May 2, 2025
…rch results (element-hq#18300)"

This reverts commit fe8bb62.

It introduced a regression in the workers test suite
@3nprob 3nprob mentioned this pull request May 7, 2025
3nprob added a commit to 3nprob/synapse-dev that referenced this pull request May 7, 2025
…rch results (element-hq#18300)"

This reverts commit fe8bb62.

It introduced a regression in the workers test suite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants