bugfix: Fix a bug which caused prev_content not to be sent to clients (#919)

I don't know how this ever passed QA... also fix a missing rows.Close()
This commit is contained in:
Kegsay 2020-03-17 16:45:40 +00:00 committed by GitHub
parent a66c701b29
commit 4af8323df3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -160,6 +160,7 @@ func (s *outputRoomEventsStatements) selectStateInRange(
if err != nil {
return nil, nil, err
}
defer rows.Close() // nolint: errcheck
// Fetch all the state change events for all rooms between the two positions then loop each event and:
// - Keep a cache of the event by ID (99% of state change events are for the event itself)
// - For each room ID, build up an array of event IDs which represents cumulative adds/removes