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
3523f543
Commit
3523f543
authored
6 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
Don't expose default_room_version as config opt
parent
7f3f1085
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
synapse/api/constants.py
+3
-0
3 additions, 0 deletions
synapse/api/constants.py
synapse/config/server.py
+0
-14
0 additions, 14 deletions
synapse/config/server.py
synapse/handlers/room.py
+2
-1
2 additions, 1 deletion
synapse/handlers/room.py
with
5 additions
and
15 deletions
synapse/api/constants.py
+
3
−
0
View file @
3523f543
...
@@ -97,6 +97,9 @@ class ThirdPartyEntityKind(object):
...
@@ -97,6 +97,9 @@ class ThirdPartyEntityKind(object):
LOCATION
=
"
location
"
LOCATION
=
"
location
"
# the version we will give rooms which are created on this server
DEFAULT_ROOM_VERSION
=
"
1
"
# vdh-test-version is a placeholder to get room versioning support working and tested
# vdh-test-version is a placeholder to get room versioning support working and tested
# until we have a working v2.
# until we have a working v2.
KNOWN_ROOM_VERSIONS
=
{
"
1
"
,
"
vdh-test-version
"
}
KNOWN_ROOM_VERSIONS
=
{
"
1
"
,
"
vdh-test-version
"
}
This diff is collapsed.
Click to expand it.
synapse/config/server.py
+
0
−
14
View file @
3523f543
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
import
logging
import
logging
from
synapse.api.constants
import
KNOWN_ROOM_VERSIONS
from
synapse.http.endpoint
import
parse_and_validate_server_name
from
synapse.http.endpoint
import
parse_and_validate_server_name
from
._base
import
Config
,
ConfigError
from
._base
import
Config
,
ConfigError
...
@@ -76,16 +75,6 @@ class ServerConfig(Config):
...
@@ -76,16 +75,6 @@ class ServerConfig(Config):
)
)
else
:
else
:
self
.
max_mau_value
=
0
self
.
max_mau_value
=
0
# the version of rooms created by default on this server
self
.
default_room_version
=
str
(
config
.
get
(
"
default_room_version
"
,
"
1
"
,
))
if
self
.
default_room_version
not
in
KNOWN_ROOM_VERSIONS
:
raise
ConfigError
(
"
Unrecognised value
'
%s
'
for default_room_version
"
%
(
self
.
default_room_version
,
))
# FIXME: federation_domain_whitelist needs sytests
# FIXME: federation_domain_whitelist needs sytests
self
.
federation_domain_whitelist
=
None
self
.
federation_domain_whitelist
=
None
federation_domain_whitelist
=
config
.
get
(
federation_domain_whitelist
=
config
.
get
(
...
@@ -260,9 +249,6 @@ class ServerConfig(Config):
...
@@ -260,9 +249,6 @@ class ServerConfig(Config):
# (except those sent by local server admins). The default is False.
# (except those sent by local server admins). The default is False.
# block_non_admin_invites: True
# block_non_admin_invites: True
# The room_version of rooms which are created by default by this server.
# default_room_version: 1
# Restrict federation to the following whitelist of domains.
# Restrict federation to the following whitelist of domains.
# N.B. we recommend also firewalling your federation listener to limit
# N.B. we recommend also firewalling your federation listener to limit
# inbound federation traffic as early as possible, rather than relying
# inbound federation traffic as early as possible, rather than relying
...
...
This diff is collapsed.
Click to expand it.
synapse/handlers/room.py
+
2
−
1
View file @
3523f543
...
@@ -26,6 +26,7 @@ from six import string_types
...
@@ -26,6 +26,7 @@ from six import string_types
from
twisted.internet
import
defer
from
twisted.internet
import
defer
from
synapse.api.constants
import
(
from
synapse.api.constants
import
(
DEFAULT_ROOM_VERSION
,
KNOWN_ROOM_VERSIONS
,
KNOWN_ROOM_VERSIONS
,
EventTypes
,
EventTypes
,
JoinRules
,
JoinRules
,
...
@@ -106,7 +107,7 @@ class RoomCreationHandler(BaseHandler):
...
@@ -106,7 +107,7 @@ class RoomCreationHandler(BaseHandler):
if
ratelimit
:
if
ratelimit
:
yield
self
.
ratelimit
(
requester
)
yield
self
.
ratelimit
(
requester
)
room_version
=
config
.
get
(
"
room_version
"
,
self
.
hs
.
config
.
default_room_version
)
room_version
=
config
.
get
(
"
room_version
"
,
DEFAULT_ROOM_VERSION
)
if
not
isinstance
(
room_version
,
string_types
):
if
not
isinstance
(
room_version
,
string_types
):
raise
SynapseError
(
raise
SynapseError
(
400
,
400
,
...
...
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