6 Commits

Author SHA1 Message Date
Kegan Dougal
84c976e8e8 Additional tests; linting 2023-09-19 13:47:58 +01:00
Kegan Dougal
471bb8c898 bugfix: don't wedge pollers when they get bad state blocks
We returned an error in Initialise when there is no create event
in the state block. If this happens, the poller automatically retries
the same request, tightlooping as the data is always going to cause
the same error. Instead, return an `internal.DataError` which is a way
of expressly telling the pollers to continue and advance the since token.

With regression test.

NB: This regression test also caught a potential bug which this PR could
have introduced. This PR lets the since token skip over bad responses, but
we want to make damn sure we process EVERYTHING ELSE in that response. In
particular, we could have skipped over large sections of `parseRoomsResponse`
as we would bail early on errors. This is now fixed to bail only after processing
the entire joined rooms map.
2023-09-12 14:16:21 +01:00
Kegan Dougal
0fea507b65 Add malformed tests for room state 2023-07-25 14:41:23 +01:00
Kegan Dougal
d745c90d95 Ignore malformed events
But handle unusual events. With regression test.

Fixes https://github.com/matrix-org/sliding-sync/issues/223
2023-07-25 14:25:30 +01:00
Kegan Dougal
6d49b6cabe Add malformed/unusual events test 2023-07-25 14:18:58 +01:00
Kegan Dougal
e947612ad9 Fix #192: ignore unseen old events 2023-07-11 19:08:32 +01:00