Avoid mutating cached values in `_generate_sync_entry_for_account_data` (#15047)

1.103.0-whithout-watcha
Sean Quah 2 years ago committed by GitHub
parent a481fb9f98
commit b95407908d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      changelog.d/15047.misc
  2. 2
      synapse/handlers/sync.py

@ -0,0 +1 @@
Avoid mutating cached values in `_generate_sync_entry_for_account_data`.

@ -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
)

Loading…
Cancel
Save