Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add /notifications endpoint to workers #16265

Merged
merged 4 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/16265.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow `/notifications` endpoint to be routed to workers.
1 change: 1 addition & 0 deletions docker/configure_workers_and_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"^/_matrix/client/(r0|v3|unstable)/password_policy$",
"^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$",
"^/_matrix/client/(r0|v3|unstable)/capabilities$",
"^/_matrix/client/(r0|v3|unstable)/notifications$",
],
"shared_extra_conf": {},
"worker_extra_conf": "",
Expand Down
1 change: 1 addition & 0 deletions docs/workers.md
clokep marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ information.
^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)
^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$
^/_matrix/client/(r0|v3|unstable)/capabilities$
^/_matrix/client/(r0|v3|unstable)/notifications$

# Encryption requests
^/_matrix/client/(r0|v3|unstable)/keys/query$
Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def register_servlets(client_resource: HttpServer, hs: "HomeServer") -> None:
if is_main_process:
report_event.register_servlets(hs, client_resource)
openid.register_servlets(hs, client_resource)
notifications.register_servlets(hs, client_resource)
notifications.register_servlets(hs, client_resource)
devices.register_servlets(hs, client_resource)
if is_main_process:
thirdparty.register_servlets(hs, client_resource)
Expand Down
2 changes: 2 additions & 0 deletions synapse/rest/client/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
class NotificationsServlet(RestServlet):
PATTERNS = client_patterns("/notifications$")

CATEGORY = "Client API requests"

def __init__(self, hs: "HomeServer"):
super().__init__()
self.store = hs.get_datastores().main
Expand Down
Loading