diff --git a/synapse/storage/databases/main/push_rule.py b/synapse/storage/databases/main/push_rule.py index 90fb106824a0..bb11a3da5f2d 100644 --- a/synapse/storage/databases/main/push_rule.py +++ b/synapse/storage/databases/main/push_rule.py @@ -507,7 +507,7 @@ def _add_push_rule_highest_priority_txn( actions_json: str, ) -> None: sql = """ - SELECT COUNT(*), MAX(priority) FROM push_rules" + SELECT COUNT(*), MAX(priority) FROM push_rules WHERE user_name = ? and priority_class = ? """