diff options
author | David Baker <dave@matrix.org> | 2015-01-23 17:49:37 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-01-23 17:49:37 +0000 |
commit | 5f84ba8ea1991dff279f0135f474d9debfd1419a (patch) | |
tree | 698b25a9c157be4b6f18ff6226a59f57c3bafa0c /synapse/storage | |
parent | Use push settings! (diff) | |
download | synapse-5f84ba8ea1991dff279f0135f474d9debfd1419a.tar.xz |
Add API to delete push rules.
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/push_rule.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py index 2366090e09..ca04f2ccee 100644 --- a/synapse/storage/push_rule.py +++ b/synapse/storage/push_rule.py @@ -174,6 +174,15 @@ class PushRuleStore(SQLBaseStore): txn.execute(sql, new_rule.values()) + @defer.inlineCallbacks + def delete_push_rule(self, user_name, rule_id): + yield self._simple_delete_one( + PushRuleTable.table_name, + { + 'user_name': user_name, + 'rule_id': rule_id + } + ) class RuleNotFoundException(Exception): pass |