Skip to content

Commit e9805d7

Browse files
Karlindephil-flex
authored andcommitted
Fill in the 'default' field for user-defined push rules (matrix-org#6639)
Signed-off-by: Karl Linderhed <[email protected]>
1 parent 436c242 commit e9805d7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

changelog.d/6639.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix missing field `default` when fetching user-defined push rules.

synapse/storage/data_stores/main/push_rule.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def _load_rules(rawrules, enabled_map):
4141
rule = dict(rawrule)
4242
rule["conditions"] = json.loads(rawrule["conditions"])
4343
rule["actions"] = json.loads(rawrule["actions"])
44+
rule["default"] = False
4445
ruleslist.append(rule)
4546

4647
# We're going to be mutating this a lot, so do a deep copy

0 commit comments

Comments
 (0)