summary refs log tree commit diff
path: root/synapse/handlers/register.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2022-02-21 18:37:04 +0000
committerGitHub <noreply@github.com>2022-02-21 18:37:04 +0000
commita85dde34459451f2ccece2374ca6280b5f55335f (patch)
tree2889fb8bad5efc19774affa45797109b813ceed6 /synapse/handlers/register.py
parentAdd type hints to `synapse/storage/databases/main` (#11984) (diff)
downloadsynapse-a85dde34459451f2ccece2374ca6280b5f55335f.tar.xz
Minor typing fixes (#12034)
These started failing in
https://github.com/matrix-org/synapse/pull/12031... I'm a bit mystified by how
they ever worked.
Diffstat (limited to '')
-rw-r--r--synapse/handlers/register.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index a719d5eef3..80320d2c07 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -320,12 +320,12 @@ class RegistrationHandler:
                 if fail_count > 10:
                     raise SynapseError(500, "Unable to find a suitable guest user ID")
 
-                localpart = await self.store.generate_user_id()
-                user = UserID(localpart, self.hs.hostname)
+                generated_localpart = await self.store.generate_user_id()
+                user = UserID(generated_localpart, self.hs.hostname)
                 user_id = user.to_string()
                 self.check_user_id_not_appservice_exclusive(user_id)
                 if generate_display_name:
-                    default_display_name = localpart
+                    default_display_name = generated_localpart
                 try:
                     await self.register_with_store(
                         user_id=user_id,