[shawn] chore: drop unused _connected_phone from telegram_bot/listener.py

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.
This commit is contained in:
TheAchiever6823
2026-05-19 15:03:35 -07:00
parent 12e7cb3fe2
commit 49130d9351
-8
View File
@@ -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()