summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2022-01-20 14:37:34 +0000
committerGitHub <noreply@github.com>2022-01-20 09:37:34 -0500
commit7bf2d6c268bb9fb6a1b22cff4287ce5f8224ac7b (patch)
tree7f8ed9866bfd5a836eec2136f1524b1683c40144
parentinstallation.md: drop python 3.6 support (#11781) (diff)
downloadsynapse-7bf2d6c268bb9fb6a1b22cff4287ce5f8224ac7b.tar.xz
Partially revert #11675; prevent attempting to create pushers on workers (#11770)
-rw-r--r--changelog.d/11770.feature1
-rw-r--r--synapse/handlers/register.py12
2 files changed, 6 insertions, 7 deletions
diff --git a/changelog.d/11770.feature b/changelog.d/11770.feature
new file mode 100644

index 0000000000..72777075cb --- /dev/null +++ b/changelog.d/11770.feature
@@ -0,0 +1 @@ +Add a flag to the `synapse_review_recent_signups` script to ignore and filter appservice users. \ No newline at end of file diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index 68dbae5916..f08a516a75 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py
@@ -979,18 +979,16 @@ class RegistrationHandler: if ( self.hs.config.email.email_enable_notifs and self.hs.config.email.email_notif_for_new_users + and token ): # Pull the ID of the access token back out of the db # It would really make more sense for this to be passed # up when the access token is saved, but that's quite an # invasive change I'd rather do separately. - if token: - user_tuple = await self.store.get_user_by_access_token(token) - # The token better still exist. - assert user_tuple - token_id = user_tuple.token_id - else: - token_id = None + user_tuple = await self.store.get_user_by_access_token(token) + # The token better still exist. + assert user_tuple + token_id = user_tuple.token_id await self.pusher_pool.add_pusher( user_id=user_id,