Fix available_suffixes_more_info
This commit is contained in:
parent
abb3ec1f05
commit
7915a2abb9
|
@ -92,16 +92,19 @@ def available_suffixes_more_info(user: User) -> [SuffixInfo]:
|
||||||
# for each user domain, generate both the domain and a random suffix version
|
# for each user domain, generate both the domain and a random suffix version
|
||||||
for custom_domain in user_custom_domains:
|
for custom_domain in user_custom_domains:
|
||||||
suffix = "@" + custom_domain.domain
|
suffix = "@" + custom_domain.domain
|
||||||
suffixes.append(SuffixInfo(True, suffix, signer.sign(suffix).decode(), False))
|
|
||||||
if custom_domain.random_prefix_generation:
|
|
||||||
suffix = "." + random_word() + "@" + custom_domain.domain
|
|
||||||
suffix_info = SuffixInfo(True, suffix, signer.sign(suffix).decode(), False)
|
suffix_info = SuffixInfo(True, suffix, signer.sign(suffix).decode(), False)
|
||||||
|
|
||||||
# put the default domain to top
|
# put the default domain to top
|
||||||
if user.default_alias_custom_domain_id == custom_domain.id:
|
if user.default_alias_custom_domain_id == custom_domain.id:
|
||||||
suffixes.insert(0, suffix_info)
|
suffixes.insert(0, suffix_info)
|
||||||
else:
|
else:
|
||||||
suffixes.append(suffix_info)
|
suffixes.append(suffix_info)
|
||||||
|
|
||||||
|
if custom_domain.random_prefix_generation:
|
||||||
|
suffix = "." + random_word() + "@" + custom_domain.domain
|
||||||
|
suffix_info = SuffixInfo(True, suffix, signer.sign(suffix).decode(), False)
|
||||||
|
suffixes.append(suffix_info)
|
||||||
|
|
||||||
# then SimpleLogin domain
|
# then SimpleLogin domain
|
||||||
for sl_domain in user.get_sl_domains():
|
for sl_domain in user.get_sl_domains():
|
||||||
suffix = (
|
suffix = (
|
||||||
|
|
Loading…
Reference in a new issue