Skip to content
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

Merged
merged 8 commits into from
Feb 10, 2023

Conversation

MatMaul
Copy link
Contributor

@MatMaul MatMaul commented Dec 2, 2022

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.

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)
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

@DMRobertson DMRobertson left a 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!

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 <[email protected]>
Co-authored-by: Sean Quah <[email protected]>
Co-authored-by: David Robertson <[email protected]>
@squahtx squahtx merged commit e9d71c7 into main Feb 10, 2023
@squahtx squahtx deleted the mv/join-during-fast-join branch February 10, 2023 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants