Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 7bf2d6c

Browse files
Partially revert #11675; prevent attempting to create pushers on workers (#11770)
1 parent 56834ab commit 7bf2d6c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

changelog.d/11770.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a flag to the `synapse_review_recent_signups` script to ignore and filter appservice users.

synapse/handlers/register.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -979,18 +979,16 @@ async def _register_email_threepid(
979979
if (
980980
self.hs.config.email.email_enable_notifs
981981
and self.hs.config.email.email_notif_for_new_users
982+
and token
982983
):
983984
# Pull the ID of the access token back out of the db
984985
# It would really make more sense for this to be passed
985986
# up when the access token is saved, but that's quite an
986987
# invasive change I'd rather do separately.
987-
if token:
988-
user_tuple = await self.store.get_user_by_access_token(token)
989-
# The token better still exist.
990-
assert user_tuple
991-
token_id = user_tuple.token_id
992-
else:
993-
token_id = None
988+
user_tuple = await self.store.get_user_by_access_token(token)
989+
# The token better still exist.
990+
assert user_tuple
991+
token_id = user_tuple.token_id
994992

995993
await self.pusher_pool.add_pusher(
996994
user_id=user_id,

0 commit comments

Comments
 (0)