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

Commit 35d0062

Browse files
nico-famedlyFizzadar
authored andcommitted
Always send default and rule_id to clients (matrix-org#13904)
1 parent 814e5da commit 35d0062

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
@@ -103,10 +103,8 @@ def _rule_to_template(rule: PushRule) -> Optional[Dict[str, Any]]:
103103
# with PRIORITY_CLASS_INVERSE_MAP.
104104
raise ValueError("Unexpected template_name: %s" % (template_name,))
105105

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

112110

0 commit comments

Comments
 (0)