mirror of
https://github.com/element-hq/synapse
synced 2024-09-29 15:52:43 +00:00
Fix lint and typecheck
This commit is contained in:
parent
64dda7b8d1
commit
3a4e911a5f
1 changed files with 11 additions and 8 deletions
|
@ -185,8 +185,12 @@ class RoomSummaryHandler:
|
||||||
|
|
||||||
# First of all, check that the room is accessible locally.
|
# First of all, check that the room is accessible locally.
|
||||||
# OR accessible through federation.
|
# OR accessible through federation.
|
||||||
local_room = await self._store.is_host_joined(room_id, self._server_name)
|
local_room = await self._store.is_host_joined(
|
||||||
if local_room and not await self._is_local_room_accessible(requested_room_id, requester):
|
requested_room_id, self._server_name
|
||||||
|
)
|
||||||
|
if local_room and not await self._is_local_room_accessible(
|
||||||
|
requested_room_id, requester
|
||||||
|
):
|
||||||
raise UnstableSpecAuthError(
|
raise UnstableSpecAuthError(
|
||||||
403,
|
403,
|
||||||
"User %s not in room %s, and room previews are disabled"
|
"User %s not in room %s, and room previews are disabled"
|
||||||
|
@ -195,15 +199,14 @@ class RoomSummaryHandler:
|
||||||
)
|
)
|
||||||
|
|
||||||
if not local_room:
|
if not local_room:
|
||||||
(
|
room_hierarchy = await self._summarize_remote_room_hierarchy(
|
||||||
room_entry,
|
|
||||||
children_room_entries,
|
|
||||||
inaccessible_children,
|
|
||||||
) = await self._summarize_remote_room_hierarchy(
|
|
||||||
_RoomQueueEntry(requested_room_id, ()),
|
_RoomQueueEntry(requested_room_id, ()),
|
||||||
False,
|
False,
|
||||||
)
|
)
|
||||||
if not room_entry or not await self._is_remote_room_accessible(requester, requested_room_id, room_entry.room):
|
root_room_entry = room_hierarchy[0]
|
||||||
|
if not root_room_entry or not await self._is_remote_room_accessible(
|
||||||
|
requester, requested_room_id, root_room_entry.room
|
||||||
|
):
|
||||||
raise UnstableSpecAuthError(
|
raise UnstableSpecAuthError(
|
||||||
403,
|
403,
|
||||||
"User %s not in room %s, and room previews are disabled"
|
"User %s not in room %s, and room previews are disabled"
|
||||||
|
|
Loading…
Reference in a new issue