team-mail

This commit is contained in:
2026-02-07 02:42:05 +08:00
parent 6b41c9bccd
commit 713564fc25
3 changed files with 8 additions and 8 deletions

View File

@@ -957,12 +957,12 @@ def get_random_domain() -> str:
def generate_random_email(prefix_len: int = 8) -> str:
prefix = ''.join(random.choices(string.ascii_lowercase + string.digits, k=prefix_len))
return f"{prefix}oaiteam@{get_random_domain()}"
return f"team-{prefix}oaiteam@{get_random_domain()}"
def generate_email_for_user(username: str) -> str:
safe = re.sub(r'[^a-zA-Z0-9]', '', username.lower())[:20]
return f"{safe}oaiteam@{get_random_domain()}"
return f"team-{safe}oaiteam@{get_random_domain()}"
def get_team(index: int = 0) -> dict: