Add the /account/whoami endpoint to generic workers (#12866)

This commit is contained in:
Nick Mills-Barrett 2022-05-25 10:41:41 +01:00 committed by GitHub
parent b4fab0b14f
commit 2e5f88b5e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

1
changelog.d/12866.misc Normal file
View file

@ -0,0 +1 @@
Enable the `/account/whoami` endpoint on synapse worker processes. Contributed by Nick @ Beeper.

View file

@ -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$

View file

@ -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