summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-08-06 10:52:26 +0100
committerBrendan Abolivier <babolivier@matrix.org>2020-08-06 10:52:26 +0100
commitdd11f575a29b59aced6cfa7ea7b9faea6f968f8d (patch)
treeb2ff0764c2db289f22290e9adbac6b3978ef79c3 /synapse/config
parentFix PUT /pushrules to use the right rule IDs (diff)
downloadsynapse-dd11f575a29b59aced6cfa7ea7b9faea6f968f8d.tar.xz
Incorporate review
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/server.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 68d143410f..00fa07c225 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -540,6 +540,9 @@ class ServerConfig(Config):
         if not isinstance(self.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(self.users_new_default_push_rules)
+
     def has_tls_listener(self) -> bool:
         return any(listener.tls for listener in self.listeners)