aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-12-18 13:33:08 +0000
committerGitHub <noreply@github.com>2020-12-18 13:33:08 +0000
commit65ff5c9a2c0b81cb9c6df6fb6e27418577eb1160 (patch)
treee8389b06aa18b65aa96ab60d8b051f03937e845f
parent50963b724b12f4f8155ac00a677afe38d0bd69d8 (diff)
Don't send null in joined_rooms response (#1659)
-rw-r--r--clientapi/routing/memberships.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/clientapi/routing/memberships.go b/clientapi/routing/memberships.go
index 513fcefd..6ddcf1be 100644
--- a/clientapi/routing/memberships.go
+++ b/clientapi/routing/memberships.go
@@ -111,6 +111,9 @@ func GetJoinedRooms(
util.GetLogger(req.Context()).WithError(err).Error("QueryRoomsForUser failed")
return jsonerror.InternalServerError()
}
+ if res.RoomIDs == nil {
+ res.RoomIDs = []string{}
+ }
return util.JSONResponse{
Code: http.StatusOK,
JSON: getJoinedRoomsResponse{res.RoomIDs},