Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion tests/restricted_rooms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,21 @@ func checkRestrictedRoom(t *testing.T, alice *client.CSAPI, bob *client.CSAPI, a
bob.JoinRoom(t, room, []string{"hs1"})

// Joining the same room again should work fine (e.g. to change your display name).
bob.JoinRoom(t, room, []string{"hs1"})
bob.SendEventSynced(
t,
room,
b.Event{
Type: "m.room.member",
Sender: bob.UserID,
StateKey: &bob.UserID,
Content: map[string]interface{}{
"membership": "join",
"displayname": "Bobby",
// This should be ignored since this is a join -> join transition.
"join_authorised_via_users_server": "unused",
},
},
)

// Leaving the room works and the user is unable to re-join.
bob.LeaveRoom(t, room)
Expand Down