matrix-user-swap/tests/input/cannot_invite_public_room.json5

62 lines
1.8 KiB
Text

// Room where the old user does not have permission to invite the new user, but
// the join rules are public so this doesn't matter.
{
"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": "public"
}
},
{
"type": "m.room.power_levels",
"state_key": "",
"content": {
"invite": 50
}
}
],
// An invalid power levels event prevents even determining whether an
// invite is allowed. An invite is still unnecessary, so this should
// only report an error for power level migration.
"!invalid-power-levels:example.com": [
{
"type": "m.room.member",
"state_key": "@old:example.com",
"content": {
"membership": "join"
}
},
{
"type": "m.room.join_rules",
"state_key": "",
"content": {
"join_rule": "public"
}
},
{
"type": "m.room.power_levels",
"state_key": "",
"content": {
"invite": "some_random_string"
}
}
]
},
"old_user": {
"user_id": "@old:example.com"
},
"new_user": {
"user_id": "@new:example.com"
}
}