summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorNicolas Werner <89468146+nico-famedly@users.noreply.github.com>2022-09-29 10:57:00 +0000
committerGitHub <noreply@github.com>2022-09-29 11:57:00 +0100
commit99a7e7e0230cba5d00ec204926edae89d4b6b8c3 (patch)
treea90e24eefe7c9ce256cebf4a34cfe5e1fbc58040 /synapse/push
parentImprove backfill robustness by trying more servers. (#13890) (diff)
downloadsynapse-99a7e7e0230cba5d00ec204926edae89d4b6b8c3.tar.xz
Always send default and rule_id to clients (#13904)
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/clientformat.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/push/clientformat.py b/synapse/push/clientformat.py
index ebc13beda1..7095ae83f9 100644
--- a/synapse/push/clientformat.py
+++ b/synapse/push/clientformat.py
@@ -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