mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Try that again
This commit is contained in:
parent
47147c436d
commit
24bd5cf380
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue