mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-16 00:13:54 +01:00
Add some room read only APIs to client_reader
This commit is contained in:
parent
bacdf0cbf9
commit
9b596177ae
1 changed files with 13 additions and 1 deletions
|
@ -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.room import RoomStore
|
||||||
from synapse.replication.slave.storage.transactions import TransactionStore
|
from synapse.replication.slave.storage.transactions import TransactionStore
|
||||||
from synapse.replication.tcp.client import ReplicationClientHandler
|
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.server import HomeServer
|
||||||
from synapse.storage.engines import create_engine
|
from synapse.storage.engines import create_engine
|
||||||
from synapse.util.httpresourcetree import create_resource_tree
|
from synapse.util.httpresourcetree import create_resource_tree
|
||||||
|
@ -82,7 +88,13 @@ class ClientReaderServer(HomeServer):
|
||||||
resources[METRICS_PREFIX] = MetricsResource(RegistryProxy)
|
resources[METRICS_PREFIX] = MetricsResource(RegistryProxy)
|
||||||
elif name == "client":
|
elif name == "client":
|
||||||
resource = JsonResource(self, canonical_json=False)
|
resource = JsonResource(self, canonical_json=False)
|
||||||
|
|
||||||
PublicRoomListRestServlet(self).register(resource)
|
PublicRoomListRestServlet(self).register(resource)
|
||||||
|
RoomMemberListRestServlet(self).register(resource)
|
||||||
|
JoinedRoomMemberListRestServlet(self).register(resource)
|
||||||
|
RoomStateRestServlet(self).register(resource)
|
||||||
|
RoomEventContextServlet(self).register(resource)
|
||||||
|
|
||||||
resources.update({
|
resources.update({
|
||||||
"/_matrix/client/r0": resource,
|
"/_matrix/client/r0": resource,
|
||||||
"/_matrix/client/unstable": resource,
|
"/_matrix/client/unstable": resource,
|
||||||
|
|
Loading…
Reference in a new issue