Tests for events with incorrect auth during faster join#433
Conversation
| // the bad state event should now *not* be visible | ||
| must.MatchResponse(t, | ||
| alice.DoFunc(t, "GET", []string{"_matrix", "client", "r0", "rooms", serverRoom.RoomID, "event", badStateEvent.EventID()}), | ||
| match.HTTPResponse{ | ||
| StatusCode: 404, | ||
| JSON: []match.JSON{ | ||
| match.JSONKeyEqual("errcode", "M_NOT_FOUND"), | ||
| }, | ||
| }, | ||
| ) |
There was a problem hiding this comment.
How does this work?
Does the bad state event initially appear in the sync timeline, then disappear for future syncs?
There was a problem hiding this comment.
Does the bad state event initially appear in the sync timeline, then disappear for future syncs?
yes, basically. A client which calls /sync during the resync will see the bad state event (and, as you note elsewhere, we have no way of then telling it via subesequent incremental syncs that it was a mistake).
A client which does a sync after the resync will never see the bad state event, because we filter out rejected events from /sync results.
actually that's the same as matrix-org/matrix-spec#1209 |
A couple more faster-joins tests: one for an event that should have been rejected but was not, and one with an event that should have been accepted but was rejected.