Add API to delete push rules.

This commit is contained in:
David Baker 2015-01-23 17:49:37 +00:00
parent f21f9fa3c5
commit 5f84ba8ea1
2 changed files with 49 additions and 1 deletions

View file

@ -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