Limit sync properly

This commit is contained in:
Neil Alexander 2020-12-18 18:44:27 +00:00
parent 4a0461378a
commit 284c129c2f
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -515,6 +515,7 @@ func (d *Database) addPDUDeltaToResponse(
defer sqlutil.EndTransactionWithCheck(txn, &succeeded, &err)
stateFilter := gomatrixserverlib.DefaultStateFilter() // TODO: use filter provided in request
stateFilter.Limit = numRecentEventsPerRoom
// Work out which rooms to return in the response. This is done by getting not only the currently
// joined rooms, but also which rooms have membership transitions for this user between the 2 PDU stream positions.