summary refs log tree commit diff
path: root/synapse/push/httppusher.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-06-28 10:12:24 +0100
committerGitHub <noreply@github.com>2016-06-28 10:12:24 +0100
commitdb74dcda5b6e0fea3d80635283bcaea6355f3579 (patch)
tree6d97a0e7ac37e7d5f7c2337e7d4ea2b4efa79132 /synapse/push/httppusher.py
parentremove vector.im from default secondary DS list (diff)
parentMerge remote-tracking branch 'origin/develop' into dbkr/push_room_naming (diff)
downloadsynapse-db74dcda5b6e0fea3d80635283bcaea6355f3579.tar.xz
Merge pull request #894 from matrix-org/dbkr/push_room_naming
Use similar naming we use in email notifs for push
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r--synapse/push/httppusher.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index 3992804845..2acc6cc214 100644
--- a/synapse/push/httppusher.py
+++ b/synapse/push/httppusher.py
@@ -38,6 +38,7 @@ class HttpPusher(object):
         self.hs = hs
         self.store = self.hs.get_datastore()
         self.clock = self.hs.get_clock()
+        self.state_handler = self.hs.get_state_handler()
         self.user_id = pusherdict['user_name']
         self.app_id = pusherdict['app_id']
         self.app_display_name = pusherdict['app_display_name']
@@ -237,7 +238,9 @@ class HttpPusher(object):
 
     @defer.inlineCallbacks
     def _build_notification_dict(self, event, tweaks, badge):
-        ctx = yield push_tools.get_context_for_event(self.hs.get_datastore(), event)
+        ctx = yield push_tools.get_context_for_event(
+            self.state_handler, event, self.user_id
+        )
 
         d = {
             'notification': {
@@ -269,8 +272,8 @@ class HttpPusher(object):
         if 'content' in event:
             d['notification']['content'] = event.content
 
-        if len(ctx['aliases']):
-            d['notification']['room_alias'] = ctx['aliases'][0]
+        # We no longer send aliases separately, instead, we send the human
+        # readable name of the room, which may be an alias.
         if 'sender_display_name' in ctx and len(ctx['sender_display_name']) > 0:
             d['notification']['sender_display_name'] = ctx['sender_display_name']
         if 'name' in ctx and len(ctx['name']) > 0: