This commit is contained in:
2026-07-09 16:45:17 +03:00
parent 5c7a9710f3
commit da24ed8ba7
23 changed files with 1542 additions and 358 deletions

View File

@@ -97,6 +97,7 @@ def format_issued_access(
expire_at: datetime,
traffic_limit_bytes: int,
brand_name: str = "",
success_text: str = "",
is_renewal: bool = False,
) -> str:
normalized_brand_name = html.escape(brand_name.strip()) if brand_name.strip() else "VPN"
@@ -142,6 +143,13 @@ def format_issued_access(
"",
"<i>Если ссылка не открывается автоматически, скопируйте её в клиент вручную.</i>",
]
normalized_success_text = success_text.strip()
if normalized_success_text:
lines[7:7] = [
"<b>Информация</b>",
f"<blockquote>{html.escape(normalized_success_text)}</blockquote>",
"",
]
return "\n".join(lines)