Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract server from roomId to get hierarchy over federation #17750

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add via param for requested room id federeation summary search
Trying to fix #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
commit 8ea8cba662afcdb705c01c5fa83a61c46bb10f6e
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
Loading