Skip to content
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

Local users don't always appear first even with prefer_local_users: true #15521

Open
matrixbot opened this issue Dec 21, 2023 · 0 comments
Open

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 21, 2023

This issue has been migrated from #15521.


Description

This might be somewhere between bug and feature request, since the description of the configuration setting says it prefers them but does not put them first. Depending on the use case (i.e. schools and other organizations), it is ideal to show the local users first and foremost.

prefer_local_users: Defines whether to prefer local users in search query results. If set to true, local users are more likely to appear above remote users when searching the user directory. Defaults to false.

Steps to reproduce

  1. In homeserver.yaml config, set prefer_local_users: true
  2. Search for a user by localpart using /user_directory/search
  3. Notice that results from my homeserver (matrix.mit.edu) appears in fourth place whereas I expected it to be above the other remove homeservers.

Homeserver

matrix.mit.edu

Synapse Version

1.81.0+jammy1

Installation Method

Debian packages from packages.matrix.org

Database

Single PostgreSQL 14+238 server, no ports or restores

Workers

Single process

Platform

Ubuntu 20.04

Configuration

user_directory:
  enabled: true
  search_all_users: true
  prefer_local_users: true

Relevant log output

{@rgabriel:matrix.mit.edu} Processed request: 0.027sec/0.000sec (0.000sec, 0.000sec) (0.000sec/0.017sec/1) 554B 200 "POST /_matrix/client/r0/user_directory/search HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0" [0 dbevts]

Anything else that would be useful to know?

No response

Related: #12958 (asks for ability to only show local users, this is an in-between)

@matrixbot matrixbot changed the title Dummy issue Local users don't always appear first even with prefer_local_users: true Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant