diff options
author | Neil Johnson <neil@matrix.org> | 2018-08-31 17:11:11 +0100 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2018-08-31 17:11:11 +0100 |
commit | 0b01281e77aee7e69925f36dbb6a798772a98a45 (patch) | |
tree | da400c68b3eca4d6db8ce3ddaa14921c1d66d2a3 /synapse/rest/client/v2_alpha/register.py | |
parent | fix reference to is_threepid_reserved (diff) | |
download | synapse-0b01281e77aee7e69925f36dbb6a798772a98a45.tar.xz |
move threepid checker to config, add missing yields
Diffstat (limited to 'synapse/rest/client/v2_alpha/register.py')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index f22b7577ea..2fb4d43ccb 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -26,6 +26,7 @@ import synapse import synapse.types from synapse.api.constants import LoginType from synapse.api.errors import Codes, SynapseError, UnrecognizedRequestError +from synapse.config.server import is_threepid_reserved from synapse.http.servlet import ( RestServlet, assert_params_in_dict, @@ -408,8 +409,8 @@ class RegisterRestServlet(RestServlet): ) # Necessary due to auth checks prior to the threepid being # written to the db - if self.store.is_threepid_reserved(threepid): - self.store.upsert_monthly_active_user(registered_user_id) + if is_threepid_reserved(self.hs.config, 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) |