summary refs log tree commit diff
path: root/synapse/push/httppusher.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2014-12-18 14:49:22 +0000
committerDavid Baker <dave@matrix.org>2014-12-18 14:49:22 +0000
commit9728c305a34a1f9546d2ce0ef4c54352dc55a16d (patch)
treec5d384c9ec68bfd14939095488d6eca7fde539a3 /synapse/push/httppusher.py
parentUpdate to app_id / app_instance_id (partially) and mangle to be PEP8 compliant. (diff)
downloadsynapse-9728c305a34a1f9546d2ce0ef4c54352dc55a16d.tar.xz
after a few rethinks, a working implementation of pushers.
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r--synapse/push/httppusher.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index fd7fe4e39c..f94f673391 100644
--- a/synapse/push/httppusher.py
+++ b/synapse/push/httppusher.py
@@ -24,14 +24,13 @@ logger = logging.getLogger(__name__)
 
 
 class HttpPusher(Pusher):
-    def __init__(self, _hs, user_name, app_id, app_instance_id,
+    def __init__(self, _hs, user_name, app_id,
                  app_display_name, device_display_name, pushkey, data,
                  last_token, last_success, failing_since):
         super(HttpPusher, self).__init__(
             _hs,
             user_name,
             app_id,
-            app_instance_id,
             app_display_name,
             device_display_name,
             pushkey,
@@ -69,16 +68,18 @@ class HttpPusher(Pusher):
                 # we may have to fetch this over federation and we
                 # can't trust it anyway: is it worth it?
                 #'fromDisplayName': 'Steve Stevington'
-            },
-            #'counts': { -- we don't mark messages as read yet so
-            # we have no way of knowing
-            #    'unread': 1,
-            #    'missedCalls': 2
-            # },
-            'devices': {
-                self.pushkey: {
-                    'data': self.data_minus_url
-                }
+                #'counts': { -- we don't mark messages as read yet so
+                # we have no way of knowing
+                #    'unread': 1,
+                #    'missedCalls': 2
+                # },
+                'devices': [
+                    {
+                        'app_id': self.app_id,
+                        'pushkey': self.pushkey,
+                        'data': self.data_minus_url
+                    }
+                ]
             }
         }