Skip to content

Commit

Permalink
Fix bug where push rules would be empty in /sync
Browse files Browse the repository at this point in the history
Fixes #16987
  • Loading branch information
erikjohnston committed May 2, 2024
1 parent 7254015 commit 73128ba
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1945,12 +1945,9 @@ async def _generate_sync_entry_for_account_data(
)

if push_rules_changed:
global_account_data = {
AccountDataTypes.PUSH_RULES: await self._push_rules_handler.push_rules_for_user(
sync_config.user
),
**global_account_data,
}
global_account_data[AccountDataTypes.PUSH_RULES] = (
await self._push_rules_handler.push_rules_for_user(sync_config.user)
)
else:
all_global_account_data = await self.store.get_global_account_data_for_user(
user_id
Expand Down

0 comments on commit 73128ba

Please sign in to comment.