diff options
author | Andrej Shadura <andrewsh@debian.org> | 2020-08-19 21:17:45 +0200 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2020-08-19 21:17:45 +0200 |
commit | 84ab8cd16f9d3f03971b5fbb5e8b89480f15c1f5 (patch) | |
tree | 3321b710a139c23925928ca2a7f147173959e765 /synapse/config/server.py | |
parent | e59dea7b4cbe3528d78b694713505a5da00996b1 (diff) |
New upstream version 1.19.0
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r-- | synapse/config/server.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py index 3747a01c..9f15ed10 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -439,6 +439,9 @@ class ServerConfig(Config): validator=attr.validators.instance_of(str), default=ROOM_COMPLEXITY_TOO_GREAT, ) + admins_can_join = attr.ib( + validator=attr.validators.instance_of(bool), default=False + ) self.limit_remote_rooms = LimitRemoteRoomsConfig( **(config.get("limit_remote_rooms") or {}) @@ -527,6 +530,21 @@ class ServerConfig(Config): "request_token_inhibit_3pid_errors", False, ) + # List of users trialing the new experimental default push rules. This setting is + # not included in the sample configuration file on purpose as it's a temporary + # hack, so that some users can trial the new defaults without impacting every + # user on the homeserver. + users_new_default_push_rules = ( + config.get("users_new_default_push_rules") or [] + ) # type: list + if not isinstance(users_new_default_push_rules, list): + raise ConfigError("'users_new_default_push_rules' must be a list") + + # Turn the list into a set to improve lookup speed. + self.users_new_default_push_rules = set( + users_new_default_push_rules + ) # type: set + def has_tls_listener(self) -> bool: return any(listener.tls for listener in self.listeners) @@ -893,6 +911,10 @@ class ServerConfig(Config): # #complexity_error: "This room is too complex." + # allow server admins to join complex rooms. Default is false. + # + #admins_can_join: true + # Whether to require a user to be in the room to add an alias to it. # Defaults to 'true'. # |