aboutsummaryrefslogtreecommitdiff
path: root/federationapi/routing/routing.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2021-06-30 12:05:58 +0100
committerGitHub <noreply@github.com>2021-06-30 12:05:58 +0100
commitb7a2d369c0b4c18208db5f44a29a4829dd7e39f3 (patch)
treeade8b0e87d696491fb613d6415b4b0fade2f7c69 /federationapi/routing/routing.go
parent0e69212206d7abbe5d3e4c65b4ae369a0067bdc9 (diff)
Change how servers are selected for missing auth/prev events (#1892)
* Change how servers are selected for missing auth/prev events * Shuffle order * Move ServersInRoomProvider into api package
Diffstat (limited to 'federationapi/routing/routing.go')
-rw-r--r--federationapi/routing/routing.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/federationapi/routing/routing.go b/federationapi/routing/routing.go
index 07a28c3f..8f33c766 100644
--- a/federationapi/routing/routing.go
+++ b/federationapi/routing/routing.go
@@ -20,6 +20,7 @@ import (
"github.com/gorilla/mux"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
eduserverAPI "github.com/matrix-org/dendrite/eduserver/api"
+ federationAPI "github.com/matrix-org/dendrite/federationapi/api"
federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api"
"github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/internal/httputil"
@@ -50,6 +51,7 @@ func Setup(
userAPI userapi.UserInternalAPI,
keyAPI keyserverAPI.KeyInternalAPI,
mscCfg *config.MSCs,
+ servers federationAPI.ServersInRoomProvider,
) {
v2keysmux := keyMux.PathPrefix("/v2").Subrouter()
v1fedmux := fedMux.PathPrefix("/v1").Subrouter()
@@ -99,7 +101,7 @@ func Setup(
func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest, vars map[string]string) util.JSONResponse {
return Send(
httpReq, request, gomatrixserverlib.TransactionID(vars["txnID"]),
- cfg, rsAPI, eduAPI, keyAPI, keys, federation, mu,
+ cfg, rsAPI, eduAPI, keyAPI, keys, federation, mu, servers,
)
},
)).Methods(http.MethodPut, http.MethodOptions)