aboutsummaryrefslogtreecommitdiff
path: root/userapi/api/api.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-07-28 10:53:17 +0100
committerGitHub <noreply@github.com>2020-07-28 10:53:17 +0100
commitacc8e80a51515c953c6710cb24f36fd9d1f7aeb1 (patch)
treeb33ecfd8e4d7ed3ac7aa66226f8fd80c1cdcf649 /userapi/api/api.go
parentc63286713570e1274759db971b15405665fa391a (diff)
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
Diffstat (limited to 'userapi/api/api.go')
-rw-r--r--userapi/api/api.go16
1 files changed, 16 insertions, 0 deletions
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