Add test for joining a room already in partial state#567
Merged
Conversation
squahtx
reviewed
Jan 31, 2023
Comment on lines
+3338
to
+3346
| 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) |
Contributor
There was a problem hiding this comment.
I think we might be able to remove this?
Contributor
There was a problem hiding this comment.
Agreed---we don't use the eventID anywhere else; Alice waits to see Bob's join.
4 tasks
DMRobertson
reviewed
Feb 9, 2023
Co-authored-by: David Robertson <davidr@element.io>
DMRobertson
approved these changes
Feb 10, 2023
Contributor
DMRobertson
left a comment
There was a problem hiding this comment.
Thanks for adding the displayname test!
squahtx
pushed a commit
to matrix-org/synapse
that referenced
this pull request
Feb 10, 2023
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 <mathieuv@matrix.org> Co-authored-by: Sean Quah <seanq@matrix.org> Co-authored-by: David Robertson <davidr@element.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.