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

Commit

Permalink
Always send default and rule_id to clients (matrix-org#13904)
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-famedly authored and Fizzadar committed Sep 30, 2022
1 parent 814e5da commit 35d0062
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 @@ -103,10 +103,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 35d0062

Please sign in to comment.