Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
de65c34f
Commit
de65c34f
authored
10 years ago
by
Kegan Dougal
Browse files
Options
Downloads
Patches
Plain Diff
Honour the -w flag to enable the web client at /matrix/client
parent
9a1638ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/app/homeserver.py
+8
-5
8 additions, 5 deletions
synapse/app/homeserver.py
with
8 additions
and
5 deletions
synapse/app/homeserver.py
+
8
−
5
View file @
de65c34f
...
...
@@ -85,17 +85,20 @@ class SynapseHomeServer(HomeServer):
return
pool
def
create_resource_tree
(
self
):
def
create_resource_tree
(
self
,
web_client
):
"""
Create the resource tree for this Home Server.
This in unduly complicated because Twisted does not support putting
child resources more than 1 level deep at a time.
"""
desired_tree
=
(
# list of tuples containing (path_str, Resource)
(
"
/matrix/client
"
,
self
.
get_resource_for_web_client
()),
desired_tree
=
[
# list containing (path_str, Resource)
(
CLIENT_PREFIX
,
self
.
get_resource_for_client
()),
(
PREFIX
,
self
.
get_resource_for_federation
())
)
]
if
web_client
:
logger
.
info
(
"
Adding the web client.
"
)
desired_tree
.
append
((
"
/matrix/client
"
,
# TODO constant please
self
.
get_resource_for_web_client
()))
self
.
root_resource
=
Resource
()
# ideally we'd just use getChild and putChild but getChild doesn't work
...
...
@@ -222,7 +225,7 @@ def setup():
hs
.
register_servlets
()
hs
.
create_resource_tree
()
hs
.
create_resource_tree
(
web_client
=
args
.
webclient
)
hs
.
start_listening
(
args
.
port
)
hs
.
build_db_pool
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment