From 49130d935139ae2487e1ea086ba99abb43e8d9fb Mon Sep 17 00:00:00 2001 From: TheAchiever6823 <61914223+ShawnMadadha@users.noreply.github.com> Date: Tue, 19 May 2026 15:03:35 -0700 Subject: [PATCH] [shawn] chore: drop unused _connected_phone from telegram_bot/listener.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed: - _connected_phone (L143, 6 lines) — docstring said 'backwards-compat helper used by the user-account path' but nothing in the repo still calls it. Verified zero callers via: grep -rn '_connected_phone' backend electron frontend/src Returned only the definition line. 802 tests pass; listener module imports clean. --- backend/apps/telegram_bot/listener.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/backend/apps/telegram_bot/listener.py b/backend/apps/telegram_bot/listener.py index 96534a8d..16969d6d 100644 --- a/backend/apps/telegram_bot/listener.py +++ b/backend/apps/telegram_bot/listener.py @@ -140,14 +140,6 @@ def _connection() -> Optional[tuple[str, dict]]: return None -def _connected_phone() -> Optional[str]: - """Backwards-compat helper used by the user-account path.""" - conn = _connection() - if conn and conn[0] == "user": - return conn[1].get("phone") - return None - - def _api_creds() -> tuple[Optional[int], Optional[str]]: api_id_raw = os.environ.get("OPENSWARM_TELEGRAM_API_ID", "").strip() api_hash = os.environ.get("OPENSWARM_TELEGRAM_API_HASH", "").strip()