aboutsummaryrefslogtreecommitdiff
path: root/syncapi/sync/requestpool.go
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-09-04 14:25:01 +0100
committerGitHub <noreply@github.com>2020-09-04 14:25:01 +0100
commitca8dcf46b746686e213b184c3ae42ba0be17b46b (patch)
tree25a1708a15e8ec0cf2ab6d0a574411ce8e31cc87 /syncapi/sync/requestpool.go
parent81688d6bde5e544d11691e5b137eb444a35c9d32 (diff)
Remove QuerySharedUsers from current state server (#1396)
* Remove QuerySharedUsers from current state server * Bugfixes
Diffstat (limited to 'syncapi/sync/requestpool.go')
-rw-r--r--syncapi/sync/requestpool.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go
index 357df240..2859da71 100644
--- a/syncapi/sync/requestpool.go
+++ b/syncapi/sync/requestpool.go
@@ -25,6 +25,7 @@ import (
"github.com/matrix-org/dendrite/clientapi/jsonerror"
currentstateAPI "github.com/matrix-org/dendrite/currentstateserver/api"
keyapi "github.com/matrix-org/dendrite/keyserver/api"
+ roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
"github.com/matrix-org/dendrite/syncapi/internal"
"github.com/matrix-org/dendrite/syncapi/storage"
"github.com/matrix-org/dendrite/syncapi/types"
@@ -40,15 +41,16 @@ type RequestPool struct {
userAPI userapi.UserInternalAPI
notifier *Notifier
keyAPI keyapi.KeyInternalAPI
+ rsAPI roomserverAPI.RoomserverInternalAPI
stateAPI currentstateAPI.CurrentStateInternalAPI
}
// NewRequestPool makes a new RequestPool
func NewRequestPool(
db storage.Database, n *Notifier, userAPI userapi.UserInternalAPI, keyAPI keyapi.KeyInternalAPI,
- stateAPI currentstateAPI.CurrentStateInternalAPI,
+ rsAPI roomserverAPI.RoomserverInternalAPI, stateAPI currentstateAPI.CurrentStateInternalAPI,
) *RequestPool {
- return &RequestPool{db, userAPI, n, keyAPI, stateAPI}
+ return &RequestPool{db, userAPI, n, keyAPI, rsAPI, stateAPI}
}
// OnIncomingSyncRequest is called when a client makes a /sync request. This function MUST be
@@ -265,7 +267,7 @@ func (rp *RequestPool) currentSyncForUser(req syncRequest, latestPos types.Strea
func (rp *RequestPool) appendDeviceLists(
data *types.Response, userID string, since, to types.StreamingToken,
) (*types.Response, error) {
- _, err := internal.DeviceListCatchup(context.Background(), rp.keyAPI, rp.stateAPI, userID, data, since, to)
+ _, err := internal.DeviceListCatchup(context.Background(), rp.keyAPI, rp.rsAPI, rp.stateAPI, userID, data, since, to)
if err != nil {
return nil, fmt.Errorf("internal.DeviceListCatchup: %w", err)
}