mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-07 17:31:56 +00:00
Remove excess condition on knock->leave
check (#11900)
This commit is contained in:
parent
6d14b3dabf
commit
e3fe6347be
1
changelog.d/11900.misc
Normal file
1
changelog.d/11900.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Remove unnecessary condition on knock->leave auth rule check.
|
@ -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 (
|
||||||
|
Loading…
Reference in New Issue
Block a user