Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

user search does not retrieve all users in system #480

Open
amiraelsayed opened this issue Jul 26, 2019 · 2 comments
Open

user search does not retrieve all users in system #480

amiraelsayed opened this issue Jul 26, 2019 · 2 comments

Comments

@amiraelsayed
Copy link

if I am logged in using
username : james
password : 123456
users that comes from martix server are

Sameh/@Sameh:domain.com
Walid/@walid:domain.com
madonna/@MADONNA:domain.com

if I am logged in using
username : john
password : 123456
users that comes from martix server are

Sameh/@Sameh:domain.com
Walid/@walid:domain.com
madonna/@MADONNA:domain.com
Habib/@habib:domain.com
elias/@elias:domain.com
nour/@nour:domain.com
wiliam/@wiliam:domain.com

if I am logged in using
username : nour
password : 123456
users that comes from martix server are

john/@john:domain.com
Sameh/@Sameh:domain.com
Walid/@walid:domain.com
madonna/@MADONNA:domain.com
elias/@elias:domain.com
wiliam/@wiliam:domain.com

why that could happen?

@amiraelsayed
Copy link
Author

I am using
getSession(context).eventsApiClient.searchUsers("domain", 100, null, userFoundCallback)
in android matrix sdk

@bmarty
Copy link
Contributor

bmarty commented Oct 9, 2019

According to https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-user-directory-search, the users returned depends on the fact that the logged user shares room(s) with them:

The homeserver may determine which subset of users are searched, however the homeserver MUST at a minimum consider the users the requesting user shares a room with and those who reside in public rooms (known to the homeserver). The search MUST consider local users to the homeserver, and SHOULD query remote users as part of the search.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants