diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index fe9c0acdf18a..5620a7600a56 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -295,8 +295,8 @@ async def _local_membership_update( newly_joined = prev_member_event.membership != Membership.JOIN is_invite = prev_member_event.membership == Membership.INVITE - # If the member is not already in the room, check if they should be - # allowed access via membership in a space. + # If the member is not already in the room and is not accepting an invite, + # check if they should be allowed access via membership in a space. if ( newly_joined and not is_invite