summary refs log tree commit diff
path: root/synapse/server_notices/server_notices_sender.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/server_notices/server_notices_sender.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/server_notices/server_notices_sender.py')
-rw-r--r--synapse/server_notices/server_notices_sender.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/server_notices/server_notices_sender.py b/synapse/server_notices/server_notices_sender.py
index 9eade85851..5d23965f34 100644
--- a/synapse/server_notices/server_notices_sender.py
+++ b/synapse/server_notices/server_notices_sender.py
@@ -31,9 +31,6 @@ class ServerNoticesSender(object):
     def on_user_syncing(self, user_id):
         """Called when the user performs a sync operation.
 
-        This is only called when /sync (or /events) is called on the synapse
-        master. In a deployment with synchrotrons, on_user_ip is called
-
         Args:
             user_id (str): mxid of user who synced
 
@@ -45,7 +42,7 @@ class ServerNoticesSender(object):
         )
 
     def on_user_ip(self, user_id):
-        """Called when a worker process saw a client request.
+        """Called on the master when a worker process saw a client request.
 
         Args:
             user_id (str): mxid
@@ -53,6 +50,9 @@ class ServerNoticesSender(object):
         Returns:
             Deferred
         """
+        # The synchrotrons use a stubbed version of ServerNoticesSender, so
+        # we check for notices to send to the user in on_user_ip as well as
+        # in on_user_syncing
         return self._consent_server_notices.maybe_send_server_notice_to_user(
             user_id,
         )