-
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
Add test for joining a room already in partial state #567
Conversation
alice.Client.Timeout = 2 * time.Second | ||
paths := []string{"_matrix", "client", "v3", "rooms", serverRoom.RoomID, "send", "m.room.message", "0"} | ||
res := alice.MustDoFunc(t, "PUT", paths, client.WithJSONBody(t, map[string]interface{}{ | ||
"msgtype": "m.text", | ||
"body": "Hello world!", | ||
})) | ||
body := gjson.ParseBytes(client.ParseJSON(t, res)) | ||
eventID := body.Get("event_id").Str | ||
t.Logf("Alice sent event event ID %s", eventID) |
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.
I think we might be able to remove this?
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.
Agreed---we don't use the eventID anywhere else; Alice waits to see Bob's join.
Co-authored-by: David Robertson <[email protected]>
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.
Thanks for adding the displayname test!
Fixes #12801. Complement tests are at matrix-org/complement#567. Avoid blocking on full state when handling a subsequent join into a partial state room. Also always perform a remote join into partial state rooms, since we do not know whether the joining user has been banned and want to avoid leaking history to banned users. Signed-off-by: Mathieu Velten <[email protected]> Co-authored-by: Sean Quah <[email protected]> Co-authored-by: David Robertson <[email protected]>
Also add test for changing display name in a partial state room, since
it looks very similar to a join event.
This is currently not working on Synapse.
Associated issue is matrix-org/synapse#12801.
Tests matrix-org/synapse#14606.