From 7eb57b788b2704680721a7fb8d0221e6c9e72ddd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 12:07:46 +0000 Subject: [PATCH] Refine admin update clarity for phone extraction and reset strategy Agent-Logs-Url: https://github.com/kr0sh512/tt-simple/sessions/34c3052e-7b55-4cb8-9fee-0ee1ba315691 Co-authored-by: kr0sh512 <46405586+kr0sh512@users.noreply.github.com> --- bot.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index cee5805..3cc180b 100644 --- a/bot.py +++ b/bot.py @@ -359,7 +359,7 @@ class VpnBot: lock = self.locks.setdefault(message.from_user.id, asyncio.Lock()) order_info = getattr(payment, "order_info", None) - phone = getattr(order_info, "phone_number", None) + phone = getattr(order_info, "phone_number", None) if order_info else None async with lock: info = await self.buy_or_extend(message.from_user, months, phone) @@ -400,9 +400,7 @@ class VpnBot: expire_at = add_months(expire_from, months) data_limit = int(current.get("data_limit", 50 * GB)) if current else 50 * GB - data_limit_reset_strategy = ( - current.get("data_limit_reset_strategy") or "month" - ) if current else "month" + data_limit_reset_strategy = (current.get("data_limit_reset_strategy") if current else None) or "month" note = current.get("note") if current else self._format_new_user_note( user.first_name, user.last_name, phone )