summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/notifier.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 1911fd20ae..df9be29f3d 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -91,7 +91,25 @@ class Notifier(object):
                 )
 
     def on_new_user_event(self, *args, **kwargs):
-        pass
+        source = self.event_sources.sources[1]
+
+        listeners = self.signal_keys_to_users.get(
+            (source.SIGNAL_NAME, "moose"),
+            []
+        )
+
+        for listener in listeners:
+            events, end_token = yield source.get_new_events_for_user(
+                listener.user,
+                listener.from_token,
+                listener.limit,
+                key="moose",
+            )
+
+            if events:
+                listener.notify(
+                    self, events, listener.from_token, end_token
+                )
 
     def get_events_for(self, user, pagination_config, timeout):
         deferred = defer.Deferred()