summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2023-04-14 11:24:06 +0200
committerGitHub <noreply@github.com>2023-04-14 10:24:06 +0100
commit4af0aec54dad261bcad240d8a878a1c16934e77c (patch)
treec8e023200f1f8dece987093aff64dbd80c261155 /synapse/rest/client
parentRemove registration fallback code. (#15405) (diff)
downloadsynapse-4af0aec54dad261bcad240d8a878a1c16934e77c.tar.xz
Load `/directory/room/{roomAlias}` endpoint on workers (#15333)
* Enable `directory`

* move to worker store

* newsfile

* disable `ClientDirectoryListServer` and `ClientAppserviceDirectoryListServer` for workers
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/directory.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/client/directory.py b/synapse/rest/client/directory.py
index f17b4c8d22..570bb52747 100644
--- a/synapse/rest/client/directory.py
+++ b/synapse/rest/client/directory.py
@@ -39,12 +39,14 @@ logger = logging.getLogger(__name__)
 
 def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
     ClientDirectoryServer(hs).register(http_server)
-    ClientDirectoryListServer(hs).register(http_server)
-    ClientAppserviceDirectoryListServer(hs).register(http_server)
+    if hs.config.worker.worker_app is None:
+        ClientDirectoryListServer(hs).register(http_server)
+        ClientAppserviceDirectoryListServer(hs).register(http_server)
 
 
 class ClientDirectoryServer(RestServlet):
     PATTERNS = client_patterns("/directory/room/(?P<room_alias>[^/]*)$", v1=True)
+    CATEGORY = "Client API requests"
 
     def __init__(self, hs: "HomeServer"):
         super().__init__()