From 3db9e98456b3580f230035c186dc4216f2043908 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 2 Nov 2022 09:34:19 +0000 Subject: Don't limit `"state"` (#2849) This is apparently some incorrect behaviour that we built as a result of a spec bug (matrix-org/matrix-spec#1314) where we were applying a filter to the `"state"` section of the `/sync` response incorrectly. The client then has no way to know that the state was limited. This PR removes the state limiting, which probably also helps #2842. --- syncapi/routing/context.go | 1 - syncapi/routing/search.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'syncapi/routing') diff --git a/syncapi/routing/context.go b/syncapi/routing/context.go index 0ed164c7..095a868c 100644 --- a/syncapi/routing/context.go +++ b/syncapi/routing/context.go @@ -93,7 +93,6 @@ func Context( } stateFilter := gomatrixserverlib.StateFilter{ - Limit: 100, NotSenders: filter.NotSenders, NotTypes: filter.NotTypes, Senders: filter.Senders, diff --git a/syncapi/routing/search.go b/syncapi/routing/search.go index aef355de..081ec6cb 100644 --- a/syncapi/routing/search.go +++ b/syncapi/routing/search.go @@ -294,7 +294,7 @@ type SearchRequest struct { BeforeLimit int `json:"before_limit,omitempty"` IncludeProfile bool `json:"include_profile,omitempty"` } `json:"event_context"` - Filter gomatrixserverlib.StateFilter `json:"filter"` + Filter gomatrixserverlib.RoomEventFilter `json:"filter"` Groupings struct { GroupBy []struct { Key string `json:"key"` -- cgit v1.2.3