summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-31 17:29:35 +0100
committerNeil Johnson <neil@matrix.org>2018-08-31 17:29:35 +0100
commit301cb60d0b2de55f7feac24a043b2624ad3c8733 (patch)
treeae140eb5def07a0ecf98fd4e0178107e3ba6113c /synapse
parentmove threepid checker to config, add missing yields (diff)
downloadsynapse-301cb60d0b2de55f7feac24a043b2624ad3c8733.tar.xz
assert rather than warn hhs-4
Diffstat (limited to '')
-rw-r--r--synapse/api/auth.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index a89687f420..34382e4e3c 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -783,6 +783,7 @@ class Auth(object):
         Args:
             user_id(str|None): If present, checks for presence against existing
             MAU cohort
+
             threepid(dict|None): If present, checks for presence against configured
             reserved threepid. Used in cases where the user is trying register
             with a MAU blocked server, normally they would be rejected but their
@@ -803,9 +804,7 @@ class Auth(object):
                 limit_type=self.hs.config.hs_disabled_limit_type
             )
         if self.hs.config.limit_usage_by_mau is True:
-
-            if user_id and threepid:
-                logger.warn("Called with both user_id and threepid, this shoudn't happen")
+            assert not (user_id and threepid)
 
             # If the user is already part of the MAU cohort or a trial user
             if user_id: