summary refs log tree commit diff
path: root/synapse/storage/push_rule.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-01-29 14:58:00 +0000
committerMark Haines <mark.haines@matrix.org>2015-01-29 14:58:00 +0000
commit396a67a09ad6217cab8010466d4f06ac897ad885 (patch)
treecbe6996b8ad2b5560f17944625daedae8bf09285 /synapse/storage/push_rule.py
parentUse get_room_events_stream to get changes to the rooms if the number of chang... (diff)
parentMerge changes from develop (diff)
downloadsynapse-396a67a09ad6217cab8010466d4f06ac897ad885.tar.xz
Merge branch 'client_v2_filter' into client_v2_sync
Conflicts:
	synapse/rest/client/v2_alpha/__init__.py
Diffstat (limited to 'synapse/storage/push_rule.py')
-rw-r--r--synapse/storage/push_rule.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index 0342996ed1..c7b553292e 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -175,14 +175,17 @@ 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
-            }
-        )
+    def delete_push_rule(self, user_name, rule_id, **kwargs):
+        """
+        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
+        standard ones
+
+        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):