aboutsummaryrefslogtreecommitdiff
path: root/publicroomsapi/routing/routing.go
diff options
context:
space:
mode:
Diffstat (limited to 'publicroomsapi/routing/routing.go')
-rw-r--r--publicroomsapi/routing/routing.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/publicroomsapi/routing/routing.go b/publicroomsapi/routing/routing.go
index 321b61b8..da5ea90d 100644
--- a/publicroomsapi/routing/routing.go
+++ b/publicroomsapi/routing/routing.go
@@ -17,6 +17,8 @@ package routing
import (
"net/http"
+ "github.com/matrix-org/dendrite/roomserver/api"
+
"github.com/gorilla/mux"
"github.com/matrix-org/dendrite/clientapi/auth"
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
@@ -37,7 +39,7 @@ const pathPrefixR0 = "/_matrix/client/r0"
// applied:
// nolint: gocyclo
func Setup(
- apiMux *mux.Router, deviceDB devices.Database, publicRoomsDB storage.Database,
+ apiMux *mux.Router, deviceDB devices.Database, publicRoomsDB storage.Database, queryAPI api.RoomserverQueryAPI,
fedClient *gomatrixserverlib.FederationClient, extRoomsProvider types.ExternalPublicRoomsProvider,
) {
r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter()
@@ -64,7 +66,7 @@ func Setup(
if err != nil {
return util.ErrorResponse(err)
}
- return directory.SetVisibility(req, publicRoomsDB, vars["roomID"])
+ return directory.SetVisibility(req, publicRoomsDB, queryAPI, device, vars["roomID"])
}),
).Methods(http.MethodPut, http.MethodOptions)
r0mux.Handle("/publicRooms",