summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/config/emailconfig.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py
index 761ac33112..4318c6f13d 100644
--- a/synapse/config/emailconfig.py
+++ b/synapse/config/emailconfig.py
@@ -23,9 +23,8 @@ class EmailConfig(Config):
     def read_config(self, config):
         self.email_enable_notifs = False
 
-        email_config = config.get("email", None)
-        if email_config:
-            self.email_enable_notifs = email_config.get("enable_notifs", True)
+        email_config = config.get("email", {})
+        self.email_enable_notifs = email_config.get("enable_notifs", True)
 
         if self.email_enable_notifs:
             required = [