From 284c129c2fc3b68e82759752c809d3694cf4c077 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 18 Dec 2020 18:44:27 +0000 Subject: [PATCH] Limit sync properly --- syncapi/storage/shared/syncserver.go | 1 + 1 file changed, 1 insertion(+) diff --git a/syncapi/storage/shared/syncserver.go b/syncapi/storage/shared/syncserver.go index 128aaa5b7..d6f85e17f 100644 --- a/syncapi/storage/shared/syncserver.go +++ b/syncapi/storage/shared/syncserver.go @@ -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.