Skip to content

Commit

Permalink
Convert boolean event content to strings for push rule evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Mar 8, 2022
1 parent 7cb7c52 commit 5ccd5a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions synapse/push/push_rule_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ def _flatten_dict(
if result is None:
result = {}
for key, value in d.items():
if isinstance(value, bool):
value = str(value)
if isinstance(value, str):
result[".".join(prefix + [key])] = value.lower()
elif isinstance(value, dict):
Expand Down

0 comments on commit 5ccd5a5

Please sign in to comment.