From 81e454c0bad7bd2b4f867f50f7a777a7ebdd4808 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Thu, 24 Aug 2017 15:00:24 +0100 Subject: [PATCH] Use structure for response to match with the spec --- .../matrix-org/dendrite/clientapi/readers/memberships.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/readers/memberships.go b/src/github.com/matrix-org/dendrite/clientapi/readers/memberships.go index c734e3b34..9d7519ee7 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/readers/memberships.go +++ b/src/github.com/matrix-org/dendrite/clientapi/readers/memberships.go @@ -23,9 +23,14 @@ import ( "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/common/config" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" ) +type response struct { + Chunk []gomatrixserverlib.ClientEvent `json:"chunk"` +} + // GetMemberships implements GET /rooms/{roomId}/members func GetMemberships( req *http.Request, device *authtypes.Device, roomID string, @@ -50,6 +55,6 @@ func GetMemberships( return util.JSONResponse{ Code: 200, - JSON: queryRes.JoinEvents, + JSON: response{queryRes.JoinEvents}, } }