diff options
author | Nick Mills-Barrett <nick@beeper.com> | 2022-05-25 10:41:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 10:41:41 +0100 |
commit | 2e5f88b5e69fa4d7385b32d9c439e0073e8d6916 (patch) | |
tree | 3d76320e0635dc55a0131c452dcd4aec4a6fc916 | |
parent | Fix incorrect worker-allowed path in documentation (#12867) (diff) | |
download | synapse-2e5f88b5e69fa4d7385b32d9c439e0073e8d6916.tar.xz |
Add the `/account/whoami` endpoint to generic workers (#12866)
-rw-r--r-- | changelog.d/12866.misc | 1 | ||||
-rw-r--r-- | docs/workers.md | 1 | ||||
-rw-r--r-- | synapse/app/generic_worker.py | 3 |
3 files changed, 4 insertions, 1 deletions
diff --git a/changelog.d/12866.misc b/changelog.d/12866.misc new file mode 100644 index 0000000000..3f7ef59253 --- /dev/null +++ b/changelog.d/12866.misc @@ -0,0 +1 @@ +Enable the `/account/whoami` endpoint on synapse worker processes. Contributed by Nick @ Beeper. diff --git a/docs/workers.md b/docs/workers.md index 25b9338e57..3c3360ccb4 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -208,6 +208,7 @@ information. ^/_matrix/client/(v1|unstable/org.matrix.msc2946)/rooms/.*/hierarchy$ ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$ ^/_matrix/client/(r0|v3|unstable)/account/3pid$ + ^/_matrix/client/(r0|v3|unstable)/account/whoami$ ^/_matrix/client/(r0|v3|unstable)/devices$ ^/_matrix/client/versions$ ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$ diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index 2a9480a5c1..39d9db8d98 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -87,7 +87,7 @@ from synapse.rest.client import ( voip, ) from synapse.rest.client._base import client_patterns -from synapse.rest.client.account import ThreepidRestServlet +from synapse.rest.client.account import ThreepidRestServlet, WhoamiRestServlet from synapse.rest.client.devices import DevicesRestServlet from synapse.rest.client.keys import ( KeyChangesServlet, @@ -289,6 +289,7 @@ class GenericWorkerServer(HomeServer): RegistrationTokenValidityRestServlet(self).register(resource) login.register_servlets(self, resource) ThreepidRestServlet(self).register(resource) + WhoamiRestServlet(self).register(resource) DevicesRestServlet(self).register(resource) # Read-only |