summary refs log tree commit diff
path: root/synapse/config/registration.py
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2019-11-26 18:42:27 +0000
committerGitHub <noreply@github.com>2019-11-26 18:42:27 +0000
commitce578031f4d0fe6f1eb26de4cb3d30a4175468db (patch)
treef4bb43d389e0fefbbfdc03e173cc2c0eb11d0c4e /synapse/config/registration.py
parentMerge pull request #6343 from matrix-org/rav/event_auth/4 (diff)
downloadsynapse-ce578031f4d0fe6f1eb26de4cb3d30a4175468db.tar.xz
Remove assertion and provide a clear warning on startup for missing public_baseurl (#6379)
Diffstat (limited to 'synapse/config/registration.py')
-rw-r--r--synapse/config/registration.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index 1f6dac69da..ee9614c5f7 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -106,6 +106,13 @@ class RegistrationConfig(Config):
         account_threepid_delegates = config.get("account_threepid_delegates") or {}
         self.account_threepid_delegate_email = account_threepid_delegates.get("email")
         self.account_threepid_delegate_msisdn = account_threepid_delegates.get("msisdn")
+        if self.account_threepid_delegate_msisdn and not self.public_baseurl:
+            raise ConfigError(
+                "The configuration option `public_baseurl` is required if "
+                "`account_threepid_delegate.msisdn` is set, such that "
+                "clients know where to submit validation tokens to. Please "
+                "configure `public_baseurl`."
+            )
 
         self.default_identity_server = config.get("default_identity_server")
         self.allow_guest_access = config.get("allow_guest_access", False)