summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/app/generic_worker.py6
-rw-r--r--synapse/handlers/typing.py22
-rw-r--r--synapse/replication/tcp/handler.py2
-rw-r--r--synapse/rest/client/v1/room.py2
4 files changed, 19 insertions, 13 deletions
diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py
index 9eba101d0a..fb16059fac 100644
--- a/synapse/app/generic_worker.py
+++ b/synapse/app/generic_worker.py
@@ -105,6 +105,7 @@ from synapse.rest.client.v1.room import (
     RoomSendEventRestServlet,
     RoomStateEventRestServlet,
     RoomStateRestServlet,
+    RoomTypingRestServlet,
 )
 from synapse.rest.client.v1.voip import VoipRestServlet
 from synapse.rest.client.v2_alpha import groups, sync, user_directory
@@ -464,6 +465,7 @@ class GenericWorkerServer(HomeServer):
                     ProfileDisplaynameRestServlet(self).register(resource)
                     ProfileRestServlet(self).register(resource)
                     KeyUploadServlet(self).register(resource)
+                    RoomTypingRestServlet(self).register(resource)
 
                     sync.register_servlets(self, resource)
                     events.register_servlets(self, resource)
@@ -892,6 +894,8 @@ def start(config_options):
         config.send_federation = True
 
     config.server.handle_typing = False
+    if config.worker_app == "synapse.app.client_reader":
+        config.server.handle_typing = True
 
     synapse.events.USE_FROZEN_DICTS = config.use_frozen_dicts
 
@@ -908,6 +912,8 @@ def start(config_options):
         "before", "startup", _base.start, ss, config.worker_listeners
     )
 
+    ss.get_replication_streamer()
+
     _base.start_worker_reactor("synapse-generic-worker", config)
 
 
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py
index a6edea412b..9291b54ef6 100644
--- a/synapse/handlers/typing.py
+++ b/synapse/handlers/typing.py
@@ -56,7 +56,7 @@ class TypingHandler(object):
         self.clock = hs.get_clock()
         self.wheel_timer = WheelTimer(bucket_size=5000)
 
-        self.federation = hs.get_federation_sender()
+        # self.federation = hs.get_federation_sender()
 
         hs.get_federation_registry().register_edu_handler("m.typing", self._recv_edu)
 
@@ -203,16 +203,16 @@ class TypingHandler(object):
             for domain in {get_domain_from_id(u) for u in users}:
                 if domain != self.server_name:
                     logger.debug("sending typing update to %s", domain)
-                    self.federation.build_and_send_edu(
-                        destination=domain,
-                        edu_type="m.typing",
-                        content={
-                            "room_id": member.room_id,
-                            "user_id": member.user_id,
-                            "typing": typing,
-                        },
-                        key=member,
-                    )
+                    # self.federation.build_and_send_edu(
+                    #     destination=domain,
+                    #     edu_type="m.typing",
+                    #     content={
+                    #         "room_id": member.room_id,
+                    #         "user_id": member.user_id,
+                    #         "typing": typing,
+                    #     },
+                    #     key=member,
+                    # )
         except Exception:
             logger.exception("Error pushing typing notif to remotes")
 
diff --git a/synapse/replication/tcp/handler.py b/synapse/replication/tcp/handler.py
index c197f6c26d..62471a887b 100644
--- a/synapse/replication/tcp/handler.py
+++ b/synapse/replication/tcp/handler.py
@@ -218,7 +218,7 @@ class ReplicationClientHandler:
             rows: a list of Stream.ROW_TYPE objects as returned by
                 Stream.parse_row.
         """
-        logger.debug("Received rdata %s -> %s", stream_name, token)
+        logger.info("Received rdata %s -> %s", stream_name, token)
         await self.replication_data_handler.on_rdata(stream_name, token, rows)
 
     async def on_POSITION(self, cmd: PositionCommand):
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index bffd43de5f..3ae85e2086 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -816,7 +816,7 @@ class RoomTypingRestServlet(RestServlet):
 
         content = parse_json_object_from_request(request)
 
-        await self.presence_handler.bump_presence_active_time(requester.user)
+        # await self.presence_handler.bump_presence_active_time(requester.user)
 
         # Limit timeout to stop people from setting silly typing timeouts.
         timeout = min(content.get("timeout", 30000), 120000)