matrix-android-sdk icon indicating copy to clipboard operation
matrix-android-sdk copied to clipboard

user search does not retrieve all users in system

Open amiraelsayed opened this issue 6 years ago • 2 comments

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 avatar Jul 26 '19 15:07 amiraelsayed

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

amiraelsayed avatar Jul 26 '19 15:07 amiraelsayed

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.

bmarty avatar Oct 09 '19 10:10 bmarty