Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 04fdfe5

Browse files
committed
Tweak the method name.
1 parent c0a5192 commit 04fdfe5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

synapse/handlers/room_member.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,14 @@ async def ratelimit_invite(
179179

180180
await self._invites_per_user_limiter.ratelimit(requester, invitee_user_id)
181181

182-
async def _can_join_restricted_room(
182+
async def _can_join_without_invite(
183183
self, state_ids: StateMap[str], room_version: RoomVersion, user_id: str
184184
) -> bool:
185185
"""
186-
Check whether a user can join a restricted room.
186+
Check whether a user can join a room without an invite.
187+
188+
When joining a room with restricted joined rules (as defined in MSC3083),
189+
the membership of spaces must be checked during join.
187190
188191
Args:
189192
state_ids: The state of the room as it currently is.
@@ -300,7 +303,7 @@ async def _local_membership_update(
300303
if (
301304
newly_joined
302305
and not user_is_invited
303-
and not await self._can_join_restricted_room(
306+
and not await self._can_join_without_invite(
304307
prev_state_ids, event.room_version, user_id
305308
)
306309
):

0 commit comments

Comments
 (0)