-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests for events with incorrect auth during faster join #433
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable!
It's upsetting that state during a partial join works like this. I suspect we don't let incremental syncing clients know when state becomes unrejected. And we have no way of "deleting" state in incremental sync.
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.