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

Commit

Permalink
Add the /account/whoami endpoint to generic workers (#12866)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar authored May 25, 2022
1 parent b4fab0b commit 2e5f88b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/12866.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enable the `/account/whoami` endpoint on synapse worker processes. Contributed by Nick @ Beeper.
1 change: 1 addition & 0 deletions docs/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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$
Expand Down
3 changes: 2 additions & 1 deletion synapse/app/generic_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
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,
Expand Down Expand Up @@ -289,6 +289,7 @@ def _listen_http(self, listener_config: ListenerConfig) -> None:
RegistrationTokenValidityRestServlet(self).register(resource)
login.register_servlets(self, resource)
ThreepidRestServlet(self).register(resource)
WhoamiRestServlet(self).register(resource)
DevicesRestServlet(self).register(resource)

# Read-only
Expand Down

0 comments on commit 2e5f88b

Please sign in to comment.