Try that again

This commit is contained in:
Neil Alexander 2022-03-09 10:09:25 +00:00
parent 47147c436d
commit 24bd5cf380
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

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