summary refs log tree commit diff
path: root/synapse/replication/tcp/protocol.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-06-27 15:36:47 +0100
committerGitHub <noreply@github.com>2017-06-27 15:36:47 +0100
commit4b444723f00d08ade995e1e757c61b9fc924aaf9 (patch)
treee5d0fe900254108d653f5d6486d720e4f57d28b5 /synapse/replication/tcp/protocol.py
parentMerge pull request #2307 from matrix-org/erikj/user_ip_batch (diff)
parentMake workers report to master for user ip updates (diff)
downloadsynapse-4b444723f00d08ade995e1e757c61b9fc924aaf9.tar.xz
Merge pull request #2308 from matrix-org/erikj/user_ip_repl
Make workers report to master for user ip updates
Diffstat (limited to 'synapse/replication/tcp/protocol.py')
-rw-r--r--synapse/replication/tcp/protocol.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/replication/tcp/protocol.py b/synapse/replication/tcp/protocol.py
index 9fee2a484b..062272f8dd 100644
--- a/synapse/replication/tcp/protocol.py
+++ b/synapse/replication/tcp/protocol.py
@@ -406,6 +406,12 @@ class ServerReplicationStreamProtocol(BaseReplicationStreamProtocol):
     def on_INVALIDATE_CACHE(self, cmd):
         self.streamer.on_invalidate_cache(cmd.cache_func, cmd.keys)
 
+    def on_USER_IP(self, cmd):
+        self.streamer.on_user_ip(
+            cmd.user_id, cmd.access_token, cmd.ip, cmd.user_agent, cmd.device_id,
+            cmd.last_seen,
+        )
+
     @defer.inlineCallbacks
     def subscribe_to_stream(self, stream_name, token):
         """Subscribe the remote to a streams.