aboutsummaryrefslogtreecommitdiff
path: root/clientapi
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-09-04 11:46:01 +0100
committerGitHub <noreply@github.com>2020-09-04 11:46:01 +0100
commit67cc8619d3c655beb91387cd82ecccd50b0d8f48 (patch)
treebea88aaf7f8db9e0d03e7d139e175e0a59ba3d04 /clientapi
parentc63abc8660df16a1fd458d6e0389801ebb553abc (diff)
Remove QueryKnownUsers from current state server (#1393)
* Remove QueryKnownUsers from current state server * Fix HTTP mode
Diffstat (limited to 'clientapi')
-rw-r--r--clientapi/routing/routing.go2
-rw-r--r--clientapi/routing/userdirectory.go12
2 files changed, 7 insertions, 7 deletions
diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go
index 0c63f968..14acc42f 100644
--- a/clientapi/routing/routing.go
+++ b/clientapi/routing/routing.go
@@ -639,7 +639,7 @@ func Setup(
req.Context(),
device,
userAPI,
- stateAPI,
+ rsAPI,
cfg.Matrix.ServerName,
postContent.SearchString,
postContent.Limit,
diff --git a/clientapi/routing/userdirectory.go b/clientapi/routing/userdirectory.go
index db81ffea..2659bc9c 100644
--- a/clientapi/routing/userdirectory.go
+++ b/clientapi/routing/userdirectory.go
@@ -19,7 +19,7 @@ import (
"fmt"
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
- currentstateAPI "github.com/matrix-org/dendrite/currentstateserver/api"
+ "github.com/matrix-org/dendrite/roomserver/api"
userapi "github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util"
@@ -34,7 +34,7 @@ func SearchUserDirectory(
ctx context.Context,
device *userapi.Device,
userAPI userapi.UserInternalAPI,
- stateAPI currentstateAPI.CurrentStateInternalAPI,
+ rsAPI api.RoomserverInternalAPI,
serverName gomatrixserverlib.ServerName,
searchString string,
limit int,
@@ -81,14 +81,14 @@ func SearchUserDirectory(
// start searching for known users from joined rooms.
if len(results) <= limit {
- stateReq := &currentstateAPI.QueryKnownUsersRequest{
+ stateReq := &api.QueryKnownUsersRequest{
UserID: device.UserID,
SearchString: searchString,
Limit: limit - len(results),
}
- stateRes := &currentstateAPI.QueryKnownUsersResponse{}
- if err := stateAPI.QueryKnownUsers(ctx, stateReq, stateRes); err != nil {
- errRes := util.ErrorResponse(fmt.Errorf("stateAPI.QueryKnownUsers: %w", err))
+ stateRes := &api.QueryKnownUsersResponse{}
+ if err := rsAPI.QueryKnownUsers(ctx, stateReq, stateRes); err != nil {
+ errRes := util.ErrorResponse(fmt.Errorf("rsAPI.QueryKnownUsers: %w", err))
return &errRes
}