Remove empty fields from /sync response (#2755)
First attempt at removing empty fields from `/sync` responses. Needs https://github.com/matrix-org/sytest/pull/1298 to keep Sytest happy. Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
c85bc3434f
commit
0f777d421c
7 changed files with 178 additions and 90 deletions
|
|
@ -65,7 +65,7 @@ func (p *InviteStreamProvider) IncrementalSync(
|
|||
continue
|
||||
}
|
||||
ir := types.NewInviteResponse(inviteEvent)
|
||||
req.Response.Rooms.Invite[roomID] = *ir
|
||||
req.Response.Rooms.Invite[roomID] = ir
|
||||
}
|
||||
|
||||
// When doing an initial sync, we don't want to add retired invites, as this
|
||||
|
|
@ -87,7 +87,7 @@ func (p *InviteStreamProvider) IncrementalSync(
|
|||
Type: "m.room.member",
|
||||
Content: gomatrixserverlib.RawJSON(`{"membership":"leave"}`),
|
||||
})
|
||||
req.Response.Rooms.Leave[roomID] = *lr
|
||||
req.Response.Rooms.Leave[roomID] = lr
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue