mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:56:02 -04:00
Add API to delete push rules.
This commit is contained in:
parent
f21f9fa3c5
commit
5f84ba8ea1
2 changed files with 49 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue