summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2023-02-10 13:11:20 +0000
committerGitHub <noreply@github.com>2023-02-10 08:11:20 -0500
commitb95407908dfde97e483952722b6fa7a533ff5093 (patch)
treed8a5ddb8cdbbe3113df9f1369d119208443f66e1 /synapse/handlers/sync.py
parentRefactor get_user_devices_from_cache to avoid mutating cached values. (#15040) (diff)
downloadsynapse-b95407908dfde97e483952722b6fa7a533ff5093.tar.xz
Avoid mutating cached values in `_generate_sync_entry_for_account_data` (#15047)
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 3566537894..202b35eee6 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -1753,6 +1753,7 @@ class SyncHandler:
             )
 
             if push_rules_changed:
+                global_account_data = dict(global_account_data)
                 global_account_data["m.push_rules"] = await self.push_rules_for_user(
                     sync_config.user
                 )
@@ -1763,6 +1764,7 @@ class SyncHandler:
                 account_data_by_room,
             ) = await self.store.get_account_data_for_user(sync_config.user.to_string())
 
+            global_account_data = dict(global_account_data)
             global_account_data["m.push_rules"] = await self.push_rules_for_user(
                 sync_config.user
             )