diff --git a/clientapi/routing/directory.go b/clientapi/routing/directory.go index 4214fb5db..3c1f6e2f3 100644 --- a/clientapi/routing/directory.go +++ b/clientapi/routing/directory.go @@ -238,18 +238,19 @@ type roomVisibility struct { // GetVisibility implements GET /directory/list/room/{roomID} func GetVisibility( - req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, + httpReq *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, roomID string, ) util.JSONResponse { - var res roomserverAPI.QueryPublishedRoomsResponse - err := rsAPI.QueryPublishedRooms(req.Context(), &roomserverAPI.QueryPublishedRoomsRequest{ + req := &roomserverAPI.QueryPublishedRoomsRequest{ RoomID: roomID, - }, &res) + } + res := &roomserverAPI.QueryPublishedRoomsResponse{} + err := rsAPI.QueryPublishedRooms(httpReq.Context(), req, res) logrus.Infof("XXX: QueryPublishedRoomsRequest: %+v", req) logrus.Infof("XXX: QueryPublishedRoomsResponse: %+v", res) logrus.Infof("XXX: err: %+v", err) if err != nil { - util.GetLogger(req.Context()).WithError(err).Error("QueryPublishedRooms failed") + util.GetLogger(httpReq.Context()).WithError(err).Error("QueryPublishedRooms failed") return jsonerror.InternalServerError() }