diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2022-01-20 11:03:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 11:03:42 +0000 |
commit | af13a3be29dd2d84d9255f8e613ca70c16819436 (patch) | |
tree | b80cdd284d406b30b8db17cb4f7fb8bf3fcb3ac6 /synapse/handlers/room_summary.py | |
parent | Comments and typing for `_update_outliers_txn` (#11776) (diff) | |
download | synapse-af13a3be29dd2d84d9255f8e613ca70c16819436.tar.xz |
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.
Diffstat (limited to 'synapse/handlers/room_summary.py')
-rw-r--r-- | synapse/handlers/room_summary.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/room_summary.py b/synapse/handlers/room_summary.py index 7c60cb0bdd..4844b69a03 100644 --- a/synapse/handlers/room_summary.py +++ b/synapse/handlers/room_summary.py @@ -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), ) |