From 507cd741412ee6fdf404d37b22f4ba00eb8e4707 Mon Sep 17 00:00:00 2001 From: shizhan <2813504757@qq.com> Date: Mon, 29 Jun 2026 09:12:22 +0800 Subject: [PATCH] fix(qqbot): add missing is_reconnect parameter to connect() method The base class (BasePlatformAdapter) defines connect() with '*, is_reconnect: bool = False' signature, but the QQ adapter was missing this parameter. This caused the gateway's reconnect watcher to fail when re-establishing the QQ connection after an outage, since it passes is_reconnect=True. QQ adapter uses WebSocket so there is no server-side message queue to preserve; the flag is accepted and ignored. --- gateway/platforms/qqbot/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/platforms/qqbot/adapter.py b/gateway/platforms/qqbot/adapter.py index 9532662131dff..8215b30378ce2 100644 --- a/gateway/platforms/qqbot/adapter.py +++ b/gateway/platforms/qqbot/adapter.py @@ -278,7 +278,7 @@ def enforces_own_access_policy(self) -> bool: # Connection lifecycle # ------------------------------------------------------------------ - async def connect(self) -> bool: + async def connect(self, *, is_reconnect: bool = False) -> bool: """Authenticate, obtain gateway URL, and open the WebSocket.""" if not AIOHTTP_AVAILABLE: message = "QQ startup failed: aiohttp not installed"