mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-23 23:44:26 +01:00
Allow the push rule delete method to take more specifiers.
This commit is contained in:
parent
8552ed8df2
commit
d5bdf3c0c7
1 changed files with 11 additions and 8 deletions
|
@ -175,14 +175,17 @@ class PushRuleStore(SQLBaseStore):
|
||||||
txn.execute(sql, new_rule.values())
|
txn.execute(sql, new_rule.values())
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def delete_push_rule(self, user_name, rule_id):
|
def delete_push_rule(self, user_name, rule_id, **kwargs):
|
||||||
yield self._simple_delete_one(
|
"""
|
||||||
PushRuleTable.table_name,
|
Delete a push rule. Args specify the row to be deleted and can be
|
||||||
{
|
any of the columns in the push_rule table, but below are the
|
||||||
'user_name': user_name,
|
standard ones
|
||||||
'rule_id': rule_id
|
|
||||||
}
|
Args:
|
||||||
)
|
user_name (str): The matrix ID of the push rule owner
|
||||||
|
rule_id (str): The rule_id of the rule to be deleted
|
||||||
|
"""
|
||||||
|
yield self._simple_delete_one(PushRuleTable.table_name, kwargs)
|
||||||
|
|
||||||
|
|
||||||
class RuleNotFoundException(Exception):
|
class RuleNotFoundException(Exception):
|
||||||
|
|
Loading…
Reference in a new issue