From 68b6524e141ecf8802c9d80141485ca07639d580 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 22 Apr 2020 17:42:15 +0100 Subject: [PATCH] Really don't send nulls for invite state --- syncapi/types/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncapi/types/types.go b/syncapi/types/types.go index 3cbf0f4e7..cc78c7eb7 100644 --- a/syncapi/types/types.go +++ b/syncapi/types/types.go @@ -260,7 +260,7 @@ func NewInviteResponse(ev gomatrixserverlib.HeaderedEvent) *InviteResponse { if err := json.Unmarshal(ev.Unsigned(), &unsigned); err == nil { res.InviteState.Events = unsigned.InviteRoomState } - if res.InviteState.Events == nil { + if len(res.InviteState.Events) == 0 || res.InviteState.Events == nil { res.InviteState.Events = json.RawMessage{'[', ']'} } return &res