summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-21 13:20:46 +0100
committerGitHub <noreply@github.com>2019-06-21 13:20:46 +0100
commit5f8a612af111235599f52263e0ab10632feef276 (patch)
tree8a7f456fb5d121314c6860188867bc16c66b9202
parentMerge pull request #5476 from matrix-org/erikj/histogram_extremities (diff)
parentUpdate docs/workers.rst (diff)
downloadsynapse-5f8a612af111235599f52263e0ab10632feef276.tar.xz
Merge pull request #5505 from matrix-org/erikj/messages_worker
Support pagination API in client_reader worker
-rw-r--r--changelog.d/5505.feature1
-rw-r--r--docs/workers.rst7
-rw-r--r--synapse/app/client_reader.py2
3 files changed, 10 insertions, 0 deletions
diff --git a/changelog.d/5505.feature b/changelog.d/5505.feature
new file mode 100644
index 0000000000..5c6bab2c31
--- /dev/null
+++ b/changelog.d/5505.feature
@@ -0,0 +1 @@
+Add support for handling pagination APIs on client reader worker.
diff --git a/docs/workers.rst b/docs/workers.rst
index aa4e7a120b..7b2d2db533 100644
--- a/docs/workers.rst
+++ b/docs/workers.rst
@@ -239,6 +239,13 @@ be routed to the same instance::
 
     ^/_matrix/client/(r0|unstable)/register$
 
+Pagination requests can also be handled, but all requests with the same path
+room must be routed to the same instance. Additionally, care must be taken to
+ensure that the purge history admin API is not used while pagination requests
+for the room are in flight::
+
+    ^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/messages$
+
 
 ``synapse.app.user_dir``
 ~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/synapse/app/client_reader.py b/synapse/app/client_reader.py
index 310cdab2e4..fb82206762 100644
--- a/synapse/app/client_reader.py
+++ b/synapse/app/client_reader.py
@@ -52,6 +52,7 @@ from synapse.rest.client.v1.room import (
     PublicRoomListRestServlet,
     RoomEventContextServlet,
     RoomMemberListRestServlet,
+    RoomMessageListRestServlet,
     RoomStateRestServlet,
 )
 from synapse.rest.client.v1.voip import VoipRestServlet
@@ -109,6 +110,7 @@ class ClientReaderServer(HomeServer):
                     JoinedRoomMemberListRestServlet(self).register(resource)
                     RoomStateRestServlet(self).register(resource)
                     RoomEventContextServlet(self).register(resource)
+                    RoomMessageListRestServlet(self).register(resource)
                     RegisterRestServlet(self).register(resource)
                     LoginRestServlet(self).register(resource)
                     ThreepidRestServlet(self).register(resource)