Default to 10 state events

This commit is contained in:
Till Faelligen 2024-02-19 21:01:43 +01:00
parent cbb1654cc4
commit 7d556decde
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E
3 changed files with 4 additions and 2 deletions

View file

@ -109,7 +109,8 @@ func Context(
} }
} }
stateFilter := synctypes.StateFilter{ stateFilter := synctypes.DefaultStateFilter()
stateFilter = synctypes.StateFilter{
NotSenders: filter.NotSenders, NotSenders: filter.NotSenders,
NotTypes: filter.NotTypes, NotTypes: filter.NotTypes,
Senders: filter.Senders, Senders: filter.Senders,

View file

@ -1136,7 +1136,7 @@ func testContext(t *testing.T, dbType test.DBType) {
}, },
{ {
name: "events are not limited", name: "events are not limited",
wantBeforeLength: 7, wantBeforeLength: 5,
}, },
{ {
name: "all events are limited", name: "all events are limited",

View file

@ -128,6 +128,7 @@ func DefaultEventFilter() EventFilter {
// is provided in the request // is provided in the request
func DefaultStateFilter() StateFilter { func DefaultStateFilter() StateFilter {
return StateFilter{ return StateFilter{
Limit: 10,
NotSenders: nil, NotSenders: nil,
NotTypes: nil, NotTypes: nil,
Senders: nil, Senders: nil,