0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-14 00:03:58 +01:00

Don't send null in joined_rooms response (#1659)

This commit is contained in:
Neil Alexander 2020-12-18 13:33:08 +00:00 committed by GitHub
parent 50963b724b
commit 65ff5c9a2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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},