From d836b37ad9ec95fce68231f404459e911845c8b0 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 19 Jan 2022 15:27:31 +0000 Subject: [PATCH 1/2] Partially revert #11675; prevent attempting to create pushers on workers --- synapse/handlers/register.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 68dbae591618..f08a516a7588 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -979,18 +979,16 @@ async def _register_email_threepid( 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, From 862593397429c9b458c44810f6b7f0bd6ae40bb9 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 19 Jan 2022 15:39:10 +0000 Subject: [PATCH 2/2] use the same changelog as #11675 --- changelog.d/11770.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/11770.feature diff --git a/changelog.d/11770.feature b/changelog.d/11770.feature new file mode 100644 index 000000000000..72777075cb33 --- /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