mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
improve domain matches
This commit is contained in:
parent
9d57abcadd
commit
11728561f3
@ -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 New Issue
Block a user