mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-20 10:55:09 +03:00
fix user in user regexp
This commit is contained in:
parent
907a62df28
commit
debf04556b
1 changed files with 1 additions and 1 deletions
|
@ -405,7 +405,7 @@ class RegisterRestServlet(RestServlet):
|
|||
break
|
||||
except SynapseError as e:
|
||||
if e.errcode == Codes.USER_IN_USE:
|
||||
m = re.match(r'^(.*)(\d+)$', desired_username)
|
||||
m = re.match(r'^(.*?)(\d+)$', desired_username)
|
||||
if m:
|
||||
desired_username = m.group(1) + str(
|
||||
int(m.group(2)) + 1
|
||||
|
|
Loading…
Reference in a new issue