diff options
author | Erik Johnston <erik@matrix.org> | 2018-07-18 15:30:43 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-07-18 15:33:03 +0100 |
commit | 9b596177aeb12211e86cce27aa409bc596909ed0 (patch) | |
tree | 6aa79fda84035189cc80e8e033f095571905d9ba /synapse/app/client_reader.py | |
parent | Move RoomContextHandler out of Handlers (diff) | |
download | synapse-9b596177aeb12211e86cce27aa409bc596909ed0.tar.xz |
Add some room read only APIs to client_reader
Diffstat (limited to 'synapse/app/client_reader.py')
-rw-r--r-- | synapse/app/client_reader.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/synapse/app/client_reader.py b/synapse/app/client_reader.py index b0ea26dcb4..398bb36602 100644 --- a/synapse/app/client_reader.py +++ b/synapse/app/client_reader.py @@ -40,7 +40,13 @@ from synapse.replication.slave.storage.registration import SlavedRegistrationSto from synapse.replication.slave.storage.room import RoomStore from synapse.replication.slave.storage.transactions import TransactionStore from synapse.replication.tcp.client import ReplicationClientHandler -from synapse.rest.client.v1.room import PublicRoomListRestServlet +from synapse.rest.client.v1.room import ( + JoinedRoomMemberListRestServlet, + PublicRoomListRestServlet, + RoomEventContextServlet, + RoomMemberListRestServlet, + RoomStateRestServlet, +) from synapse.server import HomeServer from synapse.storage.engines import create_engine from synapse.util.httpresourcetree import create_resource_tree @@ -82,7 +88,13 @@ class ClientReaderServer(HomeServer): resources[METRICS_PREFIX] = MetricsResource(RegistryProxy) elif name == "client": resource = JsonResource(self, canonical_json=False) + PublicRoomListRestServlet(self).register(resource) + RoomMemberListRestServlet(self).register(resource) + JoinedRoomMemberListRestServlet(self).register(resource) + RoomStateRestServlet(self).register(resource) + RoomEventContextServlet(self).register(resource) + resources.update({ "/_matrix/client/r0": resource, "/_matrix/client/unstable": resource, |