Skip to content
Snippets Groups Projects
Unverified Commit e3fe6347 authored by Travis Ralston's avatar Travis Ralston Committed by GitHub
Browse files

Remove excess condition on `knock->leave` check (#11900)

parent 6d14b3da
No related branches found
No related tags found
No related merge requests found
Remove unnecessary condition on knock->leave auth rule check.
\ No newline at end of file
...@@ -374,9 +374,9 @@ def _is_membership_change_allowed( ...@@ -374,9 +374,9 @@ def _is_membership_change_allowed(
return return
# Require the user to be in the room for membership changes other than join/knock. # Require the user to be in the room for membership changes other than join/knock.
if Membership.JOIN != membership and ( # Note that the room version check for knocking is done implicitly by `caller_knocked`
RoomVersion.msc2403_knocking and Membership.KNOCK != membership # and the ability to set a membership of `knock` in the first place.
): if Membership.JOIN != membership and Membership.KNOCK != membership:
# If the user has been invited or has knocked, they are allowed to change their # If the user has been invited or has knocked, they are allowed to change their
# membership event to leave # membership event to leave
if ( if (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment