summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha/sync.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-05-22 10:57:56 +0100
committerRichard van der Hoff <richard@matrix.org>2018-05-22 11:54:51 +0100
commit8810685df936ba60e0e9d36c9371c20f305c9126 (patch)
treecf5106c05f48f7b65c3ca99ca6f7647b12db67e6 /synapse/rest/client/v2_alpha/sync.py
parentMove consent config parsing into ConsentConfig (diff)
downloadsynapse-8810685df936ba60e0e9d36c9371c20f305c9126.tar.xz
Stub out ServerNoticesSender on the workers
... and have the sync endpoints call it directly rather than obsure indirection
via PresenceHandler
Diffstat (limited to 'synapse/rest/client/v2_alpha/sync.py')
-rw-r--r--synapse/rest/client/v2_alpha/sync.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py
index eb91c0b293..a291cffbf1 100644
--- a/synapse/rest/client/v2_alpha/sync.py
+++ b/synapse/rest/client/v2_alpha/sync.py
@@ -85,6 +85,7 @@ class SyncRestServlet(RestServlet):
         self.clock = hs.get_clock()
         self.filtering = hs.get_filtering()
         self.presence_handler = hs.get_presence_handler()
+        self._server_notices_sender = hs.get_server_notices_sender()
 
     @defer.inlineCallbacks
     def on_GET(self, request):
@@ -149,6 +150,9 @@ class SyncRestServlet(RestServlet):
         else:
             since_token = None
 
+        # send any outstanding server notices to the user.
+        yield self._server_notices_sender.on_user_syncing(user.to_string())
+
         affect_presence = set_presence != PresenceState.OFFLINE
 
         if affect_presence: