Skip to content

fix(qqbot): add INTERACTION_CREATE intent + preserve original filename - #30484

Closed
ericshonnon-maker wants to merge 1 commit into
NousResearch:mainfrom
ericshonnon-maker:fix/qqbot-intent-and-filename
Closed

fix(qqbot): add INTERACTION_CREATE intent + preserve original filename#30484
ericshonnon-maker wants to merge 1 commit into
NousResearch:mainfrom
ericshonnon-maker:fix/qqbot-intent-and-filename

Conversation

@ericshonnon-maker

Copy link
Copy Markdown

Summary

Two bugfixes for the QQBot adapter:

1. Missing INTERACTION_CREATE intent (button clicks broken)

Added (1 << 26) # INTERACTION_CREATE to the intents flags. Without this, button click interactions are silently ignored by the QQ platform gateway.

2. Attachment filename extension lost

_download_and_cache() was using the URL path as the filename, losing the original extension (e.g. .md files were saved without extension). Now passes the original_filename from the QQ message so extensions are preserved.

Files changed

  • gateway/platforms/qqbot/adapter.py

Submitted via Hermes Agent on behalf of ericshonnon-maker

- Add (1 << 26) INTERACTION_CREATE intent so button click events are received
- Pass original_filename to _download_and_cache() to preserve file extension
  (e.g. .md attachments were saved without extension, breaking file type detection)
- Update all call sites of _download_and_cache()
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/qqbot QQ Bot adapter labels May 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #27944 — both PRs add the (1 << 26) INTERACTION_CREATE intent bit and preserve original filenames in _download_and_cache(). PR #27944 (by WideLee, the original QQBot SDK author) is a superset that also includes WebSocket resilience fixes, thread-safe token management, and 362 lines of tests.

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 P2 Medium — degraded but workaround exists platform/qqbot QQ Bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants