mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-21 20:24:32 +03:00
improve domain matches
This commit is contained in:
parent
9d57abcadd
commit
11728561f3
1 changed files with 2 additions and 2 deletions
|
@ -423,9 +423,9 @@ class RegisterRestServlet(RestServlet):
|
||||||
parts = address.replace('.', ' ').split('@')
|
parts = address.replace('.', ' ').split('@')
|
||||||
org_parts = parts[1].split(' ')
|
org_parts = parts[1].split(' ')
|
||||||
|
|
||||||
if org_parts[0] == "matrix" and org_parts[1] == "org":
|
if org_parts[-2] == "matrix" and org_parts[-1] == "org":
|
||||||
org = "Tchap Admin"
|
org = "Tchap Admin"
|
||||||
elif org_parts[-2] == "gouv":
|
elif org_parts[-2] == "gouv" and org_parts[-1] == "fr":
|
||||||
org = org_parts[-3] if len(org_parts) > 2 else org_parts[-2]
|
org = org_parts[-3] if len(org_parts) > 2 else org_parts[-2]
|
||||||
else:
|
else:
|
||||||
org = org_parts[-2]
|
org = org_parts[-2]
|
||||||
|
|
Loading…
Reference in a new issue