matrix-user-swap/tests/input/invite_then_join.json5
Olivia Lee f288e725e3
add tests for invite logic
Tests for cases where the new user cannot join a room because the old
user does not have invite permissions are missing because the test code
isn't wired up for errors yet.
2024-12-03 19:27:32 -08:00

28 lines
738 B
Text

// New user needs to join an invite-only room where the old user has invite
// permission. Old user invites new user, then the new user joins.
{
"rooms": {
"!room1:example.com": [
{
"type": "m.room.member",
"state_key": "@old:example.com",
"content": {
"membership": "join"
}
},
{
"type": "m.room.join_rules",
"state_key": "",
"content": {
"join_rule": "invite"
}
}
]
},
"old_user": {
"user_id": "@old:example.com"
},
"new_user": {
"user_id": "@new:example.com"
}
}