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

Commit 99a7e7e

Browse files
authored
Always send default and rule_id to clients (#13904)
1 parent 73ecff7 commit 99a7e7e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

changelog.d/13904.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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.

synapse/push/clientformat.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,8 @@ def _rule_to_template(rule: PushRule) -> Optional[Dict[str, Any]]:
102102
# with PRIORITY_CLASS_INVERSE_MAP.
103103
raise ValueError("Unexpected template_name: %s" % (template_name,))
104104

105-
if unscoped_rule_id:
106-
templaterule["rule_id"] = unscoped_rule_id
107-
if rule.default:
108-
templaterule["default"] = True
105+
templaterule["rule_id"] = unscoped_rule_id
106+
templaterule["default"] = rule.default
109107
return templaterule
110108

111109

0 commit comments

Comments
 (0)