From acc8e80a51515c953c6710cb24f36fd9d1f7aeb1 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 28 Jul 2020 10:53:17 +0100 Subject: User directory (#1225) * User directory * Fix syncapi unit test * Make user directory only show remote users you know about from your joined rooms * Update sytest-whitelist * Review comments --- userapi/api/api.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'userapi/api/api.go') diff --git a/userapi/api/api.go b/userapi/api/api.go index bd0773f8..5791403f 100644 --- a/userapi/api/api.go +++ b/userapi/api/api.go @@ -18,6 +18,7 @@ import ( "context" "encoding/json" + "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/gomatrixserverlib" ) @@ -31,6 +32,7 @@ type UserInternalAPI interface { QueryDevices(ctx context.Context, req *QueryDevicesRequest, res *QueryDevicesResponse) error QueryAccountData(ctx context.Context, req *QueryAccountDataRequest, res *QueryAccountDataResponse) error QueryDeviceInfos(ctx context.Context, req *QueryDeviceInfosRequest, res *QueryDeviceInfosResponse) error + QuerySearchProfiles(ctx context.Context, req *QuerySearchProfilesRequest, res *QuerySearchProfilesResponse) error } // InputAccountDataRequest is the request for InputAccountData @@ -112,6 +114,20 @@ type QueryProfileResponse struct { AvatarURL string } +// QuerySearchProfilesRequest is the request for QueryProfile +type QuerySearchProfilesRequest struct { + // The search string to match + SearchString string + // How many results to return + Limit int +} + +// QuerySearchProfilesResponse is the response for QuerySearchProfilesRequest +type QuerySearchProfilesResponse struct { + // Profiles matching the search + Profiles []authtypes.Profile +} + // PerformAccountCreationRequest is the request for PerformAccountCreation type PerformAccountCreationRequest struct { AccountType AccountType // Required: whether this is a guest or user account -- cgit v1.2.3