diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py index 36f5ccf5f64f..264dd7f17949 100644 --- a/synapse/push/bulk_push_rule_evaluator.py +++ b/synapse/push/bulk_push_rule_evaluator.py @@ -540,9 +540,7 @@ def _flatten_dict( # nested fields. key = key.replace("\\", "\\\\").replace(".", "\\.") - if isinstance(value, str): - result[".".join(prefix + [key])] = value.lower() - elif isinstance(value, bool) or type(value) is int or value is None: + if isinstance(value, (bool, str)) or type(value) is int or value is None: result[".".join(prefix + [key])] = value elif isinstance(value, Mapping): # do not set `room_version` due to recursion considerations below diff --git a/tests/push/test_push_rule_evaluator.py b/tests/push/test_push_rule_evaluator.py index 4adce2be892c..a24976e997da 100644 --- a/tests/push/test_push_rule_evaluator.py +++ b/tests/push/test_push_rule_evaluator.py @@ -427,12 +427,11 @@ def test_exact_event_match_string(self) -> None: {"value": "foobaz"}, "exact value should match", ) - # TODO? - # self._assert_not_matches( - # condition, - # {"value": "FoobaZ"}, - # "values should match and be case-sensitive", - # ) + self._assert_not_matches( + condition, + {"value": "FoobaZ"}, + "values should match and be case-sensitive", + ) self._assert_not_matches( condition, {"value": "test foobaz test"},