Skip to content

Commit

Permalink
Add via param for requested room id federeation summary search
Browse files Browse the repository at this point in the history
Trying to fix element-hq#17143 again

The change actually need via parameter in the /hierarchy endpoint in spec, but IMO temporarily its a good fix to atleast look for the server extracting from the room id rather than nothing.
  • Loading branch information
kfiven authored Sep 24, 2024
1 parent aad26cb commit 8ea8cba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions synapse/handlers/room_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ async def _get_room_hierarchy(
)

if not local_room:
destination = requested_room_id.split(":", 1)[-1]
room_hierarchy = await self._summarize_remote_room_hierarchy(
_RoomQueueEntry(requested_room_id, ()),
_RoomQueueEntry(requested_room_id, (destination)),
False,
)
root_room_entry = room_hierarchy[0]
Expand Down Expand Up @@ -240,7 +241,8 @@ async def _get_room_hierarchy(
processed_rooms = set(pagination_session["processed_rooms"])
else:
# The queue of rooms to process, the next room is last on the stack.
room_queue = [_RoomQueueEntry(requested_room_id, ())]
destination = requested_room_id.split(":", 1)[-1]
room_queue = [_RoomQueueEntry(requested_room_id, (destination))]

# Rooms we have already processed.
processed_rooms = set()
Expand Down

0 comments on commit 8ea8cba

Please sign in to comment.