summary refs log tree commit diff
path: root/synapse/push/__init__.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-15 16:56:18 +0000
committerDavid Baker <dave@matrix.org>2015-01-15 16:56:18 +0000
commit2ca2dbc82183f7dbe8c01694bf1c32a8c4c4b9de (patch)
tree52cb35fcc73f76fe727cf62cb69c81d2f7b24734 /synapse/push/__init__.py
parentDon't make the pushers' event streams cause people to appear online (diff)
downloadsynapse-2ca2dbc82183f7dbe8c01694bf1c32a8c4c4b9de.tar.xz
Send room name and first alias in notification poke.
Diffstat (limited to 'synapse/push/__init__.py')
-rw-r--r--synapse/push/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/push/__init__.py b/synapse/push/__init__.py
index 9cf996fb80..5f4e833add 100644
--- a/synapse/push/__init__.py
+++ b/synapse/push/__init__.py
@@ -62,6 +62,19 @@ class Pusher(object):
         return True
 
     @defer.inlineCallbacks
+    def get_context_for_event(self, ev):
+        name_aliases = yield self.store.get_room_name_and_aliases(
+            ev['room_id']
+        )
+
+        ctx = {'aliases': name_aliases[1]}
+        if name_aliases[0] is not None:
+            ctx['name'] = name_aliases[0]
+
+        defer.returnValue(ctx)
+
+
+    @defer.inlineCallbacks
     def start(self):
         if not self.last_token:
             # First-time setup: get a token to start from (we can't