summary refs log tree commit diff
path: root/synapse/push/__init__.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-05 14:28:03 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-05 14:28:03 +0000
commit951690e54d5673431abefafc30c94af6e11341e3 (patch)
tree779471113f16dfbf7e67504731dd412101eee180 /synapse/push/__init__.py
parentFix user query checks. HS>AS pushing now works. (diff)
parentMerge branch 'federation_client_retries' of github.com:matrix-org/synapse int... (diff)
downloadsynapse-951690e54d5673431abefafc30c94af6e11341e3.tar.xz
Merge branch 'develop' into application-services
Diffstat (limited to 'synapse/push/__init__.py')
-rw-r--r--synapse/push/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/push/__init__.py b/synapse/push/__init__.py
index 28e5dae81d..8c6f0a6571 100644
--- a/synapse/push/__init__.py
+++ b/synapse/push/__init__.py
@@ -37,14 +37,14 @@ class Pusher(object):
 
     INEQUALITY_EXPR = re.compile("^([=<>]*)([0-9]*)$")
 
-    def __init__(self, _hs, instance_handle, user_name, app_id,
+    def __init__(self, _hs, profile_tag, user_name, app_id,
                  app_display_name, device_display_name, pushkey, pushkey_ts,
                  data, last_token, last_success, failing_since):
         self.hs = _hs
         self.evStreamHandler = self.hs.get_handlers().event_stream_handler
         self.store = self.hs.get_datastore()
         self.clock = self.hs.get_clock()
-        self.instance_handle = instance_handle
+        self.profile_tag = profile_tag
         self.user_name = user_name
         self.app_id = app_id
         self.app_display_name = app_display_name
@@ -147,9 +147,9 @@ class Pusher(object):
                 return False
             return fnmatch.fnmatch(val.upper(), pat.upper())
         elif condition['kind'] == 'device':
-            if 'instance_handle' not in condition:
+            if 'profile_tag' not in condition:
                 return True
-            return condition['instance_handle'] == self.instance_handle
+            return condition['profile_tag'] == self.profile_tag
         elif condition['kind'] == 'contains_display_name':
             # This is special because display names can be different
             # between rooms and so you can't really hard code it in a rule.
@@ -400,8 +400,8 @@ def _tweaks_for_actions(actions):
     for a in actions:
         if not isinstance(a, dict):
             continue
-        if 'set_sound' in a:
-            tweaks['sound'] = a['set_sound']
+        if 'set_tweak' in a and 'value' in a:
+            tweaks[a['set_tweak']] = a['value']
     return tweaks