Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Always send default and rule_id to clients (#13904)
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-famedly authored Sep 29, 2022
1 parent 73ecff7 commit 99a7e7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/13904.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in 1.66 where some required fields in the pushrules sent to clients were not present anymore. Contributed by Nico.
6 changes: 2 additions & 4 deletions synapse/push/clientformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ def _rule_to_template(rule: PushRule) -> Optional[Dict[str, Any]]:
# with PRIORITY_CLASS_INVERSE_MAP.
raise ValueError("Unexpected template_name: %s" % (template_name,))

if unscoped_rule_id:
templaterule["rule_id"] = unscoped_rule_id
if rule.default:
templaterule["default"] = True
templaterule["rule_id"] = unscoped_rule_id
templaterule["default"] = rule.default
return templaterule


Expand Down

0 comments on commit 99a7e7e

Please sign in to comment.