Skip to content

Commit

Permalink
test forbid to leave
Browse files Browse the repository at this point in the history
  • Loading branch information
lxndrbnsv committed Sep 29, 2021
1 parent f56ddce commit e172958
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions synapse/rest/client/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,12 @@ async def on_POST(
if membership_action == "join":
return_value["room_id"] = room_id

if membership_action == "leave":
raise SynapseError(
400,
"Can't leave this room!"
)

return 200, return_value

def _has_3pid_invite_keys(self, content: JsonDict) -> bool:
Expand Down

0 comments on commit e172958

Please sign in to comment.