mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 10:34:52 -04:00
Fix a bug that corrupted the cache of federated space hierarchies (#11775)
`FederationClient.get_room_hierarchy()` caches its return values, so refactor the code to avoid modifying the returned room summary.
This commit is contained in:
parent
5572e6cc4b
commit
af13a3be29
4 changed files with 102 additions and 12 deletions
|
@ -780,6 +780,7 @@ class RoomSummaryHandler:
|
|||
try:
|
||||
(
|
||||
room_response,
|
||||
children_state_events,
|
||||
children,
|
||||
inaccessible_children,
|
||||
) = await self._federation_client.get_room_hierarchy(
|
||||
|
@ -804,7 +805,7 @@ class RoomSummaryHandler:
|
|||
}
|
||||
|
||||
return (
|
||||
_RoomEntry(room_id, room_response, room_response.pop("children_state", ())),
|
||||
_RoomEntry(room_id, room_response, children_state_events),
|
||||
children_by_room_id,
|
||||
set(inaccessible_children),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue