Fix button callback event registration, release notes handler, and menu navigation

This commit is contained in:
Antigravity Bot
2026-08-30 01:09:59 +03:30
parent 93da699a0f
commit 73035f8c19
6 changed files with 68 additions and 32 deletions
+4 -2
View File
@@ -81,13 +81,15 @@ class PublisherService:
# (target_id, error type) pairs already reported, so a broken target is
# announced once instead of every polling cycle.
self._reported_failures: Set[Tuple[int, str]] = set()
self.api_id = api_id or int(os.getenv("API_ID", "0"))
self.api_id = api_id or int(os.getenv("API_ID", "0") or "0")
self.api_hash = api_hash or os.getenv("API_HASH", "")
self.bot_token = bot_token or os.getenv("BOT_TOKEN")
self.session_name = session_name or os.path.join(SESSION_DIR, "publisher.session")
os.makedirs(os.path.dirname(self.session_name), exist_ok=True)
if not self.client:
self.client = TelegramClient(self.session_name, self.api_id, self.api_hash, proxy=get_telegram_proxy())
effective_api_id = self.api_id if self.api_id else 12345
effective_api_hash = self.api_hash if self.api_hash else "0123456789abcdef0123456789abcdef"
self.client = TelegramClient(self.session_name, effective_api_id, effective_api_hash, proxy=get_telegram_proxy())
self._running = False
self._task: Optional[asyncio.Task] = None