diff --git a/src/github.com/matrix-org/dendrite/syncapi/types/types.go b/src/github.com/matrix-org/dendrite/syncapi/types/types.go index 2f91c4563..d0b1c38ab 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/types/types.go +++ b/src/github.com/matrix-org/dendrite/syncapi/types/types.go @@ -77,11 +77,11 @@ func NewResponse(pos StreamPosition) *Response { // IsEmpty returns true if the response is empty, i.e. used to decided whether // to return the response immediately to the client or to wait for more data. func (r *Response) IsEmpty() bool { - return len(r.Rooms.Join) > 0 || - len(r.Rooms.Invite) > 0 || - len(r.Rooms.Leave) > 0 || - len(r.AccountData.Events) > 0 || - len(r.Presence.Events) > 0 + return len(r.Rooms.Join) == 0 && + len(r.Rooms.Invite) == 0 && + len(r.Rooms.Leave) == 0 && + len(r.AccountData.Events) == 0 && + len(r.Presence.Events) == 0 } // JoinResponse represents a /sync response for a room which is under the 'join' key.