Skip to content

Commit

Permalink
Always send default and rule_id to clients
Browse files Browse the repository at this point in the history
Spec marks those as required fields and clients rely on it.

Broken in 1.66.

Fixes matrix-org#13837

Signed-off-by: Nicolas Werner <n.werner@famedly.com>
  • Loading branch information
nico-famedly committed Sep 26, 2022
1 parent ac1a317 commit 9e74a42
Showing 1 changed file with 2 additions and 4 deletions.
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 9e74a42

Please sign in to comment.