summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/6639.bugfix1
-rw-r--r--synapse/storage/data_stores/main/push_rule.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/changelog.d/6639.bugfix b/changelog.d/6639.bugfix
new file mode 100644
index 0000000000..c7593a6e84
--- /dev/null
+++ b/changelog.d/6639.bugfix
@@ -0,0 +1 @@
+Fix missing field `default` when fetching user-defined push rules.
diff --git a/synapse/storage/data_stores/main/push_rule.py b/synapse/storage/data_stores/main/push_rule.py
index 62ac88d9f2..46f9bda773 100644
--- a/synapse/storage/data_stores/main/push_rule.py
+++ b/synapse/storage/data_stores/main/push_rule.py
@@ -41,6 +41,7 @@ def _load_rules(rawrules, enabled_map):
         rule = dict(rawrule)
         rule["conditions"] = json.loads(rawrule["conditions"])
         rule["actions"] = json.loads(rawrule["actions"])
+        rule["default"] = False
         ruleslist.append(rule)
 
     # We're going to be mutating this a lot, so do a deep copy