summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-02-04 16:24:15 +0000
committerDavid Baker <dave@matrix.org>2015-02-04 16:24:15 +0000
commit2e77ba637a75adcf0681e04c281f4fea74ebec6b (patch)
treecb56be58d3d6863f5dd1b4226c028e6c148f4b3f /synapse/rest
parents/instance_handle/profile_tag/ (diff)
downloadsynapse-2e77ba637a75adcf0681e04c281f4fea74ebec6b.tar.xz
More s/instance_handle/profile_tag/
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v1/push_rule.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py
index 348adb9c0d..5582f33c8e 100644
--- a/synapse/rest/client/v1/push_rule.py
+++ b/synapse/rest/client/v1/push_rule.py
@@ -73,7 +73,7 @@ class PushRuleRestServlet(ClientV1RestServlet):
             'rule_id': rule_id
         }
         if device:
-            spec['device'] = device
+            spec['profile_tag'] = device
         return spec
 
     def rule_tuple_from_request_object(self, rule_template, rule_id, req_obj, device=None):
@@ -188,15 +188,15 @@ class PushRuleRestServlet(ClientV1RestServlet):
 
         user, _ = yield self.auth.get_user_by_req(request)
 
-        if 'device' in spec:
+        if 'profile_tag' in spec:
             rules = yield self.hs.get_datastore().get_push_rules_for_user_name(
                 user.to_string()
             )
 
             for r in rules:
                 conditions = json.loads(r['conditions'])
-                ih = _profile_tag_from_conditions(conditions)
-                if ih == spec['device'] and r['priority_class'] == priority_class:
+                pt = _profile_tag_from_conditions(conditions)
+                if pt == spec['profile_tag'] and r['priority_class'] == priority_class:
                     yield self.hs.get_datastore().delete_push_rule(
                         user.to_string(), spec['rule_id']
                     )
@@ -306,7 +306,7 @@ def _add_empty_priority_class_arrays(d):
 
 def _profile_tag_from_conditions(conditions):
     """
-    Given a list of conditions, return the instance handle of the
+    Given a list of conditions, return the profile tag of the
     device rule if there is one
     """
     for c in conditions: