summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2019-01-22 17:47:00 +0000
committerNeil Johnson <neil@matrix.org>2019-01-22 17:47:00 +0000
commitc99c2d58d775a7a7bcbcae426fed608d6a0e8ee3 (patch)
treed58f70cc03c5bfbac2511a2facbefea084eda72e /synapse/rest/client/v2_alpha
parentFix None guard in config.server.is_threepid_reserved (diff)
downloadsynapse-c99c2d58d775a7a7bcbcae426fed608d6a0e8ee3.tar.xz
move guard out of is_threepid_reserved and into register.py
Diffstat (limited to 'synapse/rest/client/v2_alpha')
-rw-r--r--synapse/rest/client/v2_alpha/register.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py
index 3ab253462b..7f812b8209 100644
--- a/synapse/rest/client/v2_alpha/register.py
+++ b/synapse/rest/client/v2_alpha/register.py
@@ -416,10 +416,11 @@ class RegisterRestServlet(RestServlet):
             )
             # Necessary due to auth checks prior to the threepid being
             # written to the db
-            if is_threepid_reserved(
-                self.hs.config.mau_limits_reserved_threepids, threepid
-            ):
-                yield self.store.upsert_monthly_active_user(registered_user_id)
+            if threepid:
+                if is_threepid_reserved(
+                    self.hs.config.mau_limits_reserved_threepids, threepid
+                ):
+                    yield self.store.upsert_monthly_active_user(registered_user_id)
 
             # remember that we've now registered that user account, and with
             #  what user ID (since the user may not have specified)