mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-25 05:19:23 -05:00
Add client v2_alpha resource to synapse server resource tree
This commit is contained in:
parent
e26340cee7
commit
2b1799883d
@ -32,12 +32,13 @@ from synapse.http.server_key_resource import LocalKey
|
|||||||
from synapse.http.matrixfederationclient import MatrixFederationHttpClient
|
from synapse.http.matrixfederationclient import MatrixFederationHttpClient
|
||||||
from synapse.api.urls import (
|
from synapse.api.urls import (
|
||||||
CLIENT_PREFIX, FEDERATION_PREFIX, WEB_CLIENT_PREFIX, CONTENT_REPO_PREFIX,
|
CLIENT_PREFIX, FEDERATION_PREFIX, WEB_CLIENT_PREFIX, CONTENT_REPO_PREFIX,
|
||||||
SERVER_KEY_PREFIX, MEDIA_PREFIX
|
SERVER_KEY_PREFIX, MEDIA_PREFIX, CLIENT_V2_ALPHA_PREFIX,
|
||||||
)
|
)
|
||||||
from synapse.config.homeserver import HomeServerConfig
|
from synapse.config.homeserver import HomeServerConfig
|
||||||
from synapse.crypto import context_factory
|
from synapse.crypto import context_factory
|
||||||
from synapse.util.logcontext import LoggingContext
|
from synapse.util.logcontext import LoggingContext
|
||||||
from synapse.rest.client.v1 import ClientV1RestResource
|
from synapse.rest.client.v1 import ClientV1RestResource
|
||||||
|
from synapse.rest.client.v2_alpha import ClientV2AlphaRestResource
|
||||||
|
|
||||||
from daemonize import Daemonize
|
from daemonize import Daemonize
|
||||||
import twisted.manhole.telnet
|
import twisted.manhole.telnet
|
||||||
@ -62,6 +63,9 @@ class SynapseHomeServer(HomeServer):
|
|||||||
def build_resource_for_client(self):
|
def build_resource_for_client(self):
|
||||||
return ClientV1RestResource(self)
|
return ClientV1RestResource(self)
|
||||||
|
|
||||||
|
def build_resource_for_client_v2_alpha(self):
|
||||||
|
return ClientV2AlphaRestResource(self)
|
||||||
|
|
||||||
def build_resource_for_federation(self):
|
def build_resource_for_federation(self):
|
||||||
return JsonResource()
|
return JsonResource()
|
||||||
|
|
||||||
@ -105,6 +109,7 @@ class SynapseHomeServer(HomeServer):
|
|||||||
# [ ("/aaa/bbb/cc", Resource1), ("/aaa/dummy", Resource2) ]
|
# [ ("/aaa/bbb/cc", Resource1), ("/aaa/dummy", Resource2) ]
|
||||||
desired_tree = [
|
desired_tree = [
|
||||||
(CLIENT_PREFIX, self.get_resource_for_client()),
|
(CLIENT_PREFIX, self.get_resource_for_client()),
|
||||||
|
(CLIENT_V2_ALPHA_PREFIX, self.get_resource_for_client_v2_alpha()),
|
||||||
(FEDERATION_PREFIX, self.get_resource_for_federation()),
|
(FEDERATION_PREFIX, self.get_resource_for_federation()),
|
||||||
(CONTENT_REPO_PREFIX, self.get_resource_for_content_repo()),
|
(CONTENT_REPO_PREFIX, self.get_resource_for_content_repo()),
|
||||||
(SERVER_KEY_PREFIX, self.get_resource_for_server_key()),
|
(SERVER_KEY_PREFIX, self.get_resource_for_server_key()),
|
||||||
|
@ -70,6 +70,7 @@ class BaseHomeServer(object):
|
|||||||
'notifier',
|
'notifier',
|
||||||
'distributor',
|
'distributor',
|
||||||
'resource_for_client',
|
'resource_for_client',
|
||||||
|
'resource_for_client_v2_alpha',
|
||||||
'resource_for_federation',
|
'resource_for_federation',
|
||||||
'resource_for_web_client',
|
'resource_for_web_client',
|
||||||
'resource_for_content_repo',
|
'resource_for_content_repo',
|
||||||
|
Loading…
Reference in New Issue
Block a user