Skip to content

fix(qqbot): add is_reconnect parameter to QQAdapter.connect() - #60739

Closed
litaonet wants to merge 1 commit into
NousResearch:mainfrom
litaonet:fix/qqbot-connect-is-reconnect-param
Closed

fix(qqbot): add is_reconnect parameter to QQAdapter.connect()#60739
litaonet wants to merge 1 commit into
NousResearch:mainfrom
litaonet:fix/qqbot-connect-is-reconnect-param

Conversation

@litaonet

@litaonet litaonet commented Jul 8, 2026

Copy link
Copy Markdown

Summary

Align QQAdapter.connect() signature with BasePlatformAdapter.connect(), which accepts an is_reconnect keyword argument (defined in gateway/platforms/base.py line 2864).

Problem

When the gateway attempts to reconnect the QQBot WebSocket, it calls adapter.connect(is_reconnect=True). The QQAdapter's connect() method did not accept this parameter, causing:

QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'

This prevents the QQBot platform from reconnecting after transient network drops.

Fix

Add *, is_reconnect: bool = False to QQAdapter.connect() in gateway/platforms/qqbot/adapter.py, matching the base class signature.

Verification

  • The fix is a one-line signature change — no behavioral logic modified.
  • Other platform adapters (WeChat, WhatsApp Cloud, API Server, BlueBubbles, Relay) already accept is_reconnect in their connect() methods.
  • QQBot was the only adapter missing this parameter.

Align QQAdapter.connect() signature with BasePlatformAdapter.connect(),
which accepts an is_reconnect keyword argument. Without this parameter,
the gateway raises 'got an unexpected keyword argument is_reconnect'
when reconnecting the QQBot WebSocket.
@alt-glitch alt-glitch added type/bug Something isn't working platform/qqbot QQ Bot adapter comp/gateway Gateway runner, session dispatch, delivery sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jul 8, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #52966 — identical one-line is_reconnect signature fix for QQAdapter.connect() (issue #52914). #52966 is the earliest still-open canonical fix (the truly-earliest #52922 is closed/unmerged). Related open siblings: #53948, #54977.

@litaonet litaonet closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists platform/qqbot QQ Bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants