Skip to content

fix(send_message): support QQBot C2C and group chats - #19230

Closed
kiala9 wants to merge 1 commit into
NousResearch:mainfrom
kiala9:fix-qqbot-c2c-send
Closed

fix(send_message): support QQBot C2C and group chats#19230
kiala9 wants to merge 1 commit into
NousResearch:mainfrom
kiala9:fix-qqbot-c2c-send

Conversation

@kiala9

@kiala9 kiala9 commented May 3, 2026

Copy link
Copy Markdown

The _send_qqbot function was hardcoded to use the guild channel endpoint (/channels/{id}/messages), which fails for C2C private chats and QQ groups with 'channel does not exist' (code 11263).

This change tries the appropriate endpoints in order:

  1. /channels/{id}/messages (guild channels)
  2. /v2/users/{id}/messages (C2C private chats)
  3. /v2/groups/{id}/messages (QQ groups)

Fixes active sending to QQBot C2C and group recipients.

What does this PR do?

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

How to Test

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

The _send_qqbot function was hardcoded to use the guild channel
endpoint (/channels/{id}/messages), which fails for C2C private
chats and QQ groups with 'channel does not exist' (code 11263).

This change tries the appropriate endpoints in order:
1. /channels/{id}/messages     (guild channels)
2. /v2/users/{id}/messages     (C2C private chats)
3. /v2/groups/{id}/messages    (QQ groups)

Fixes active sending to QQBot C2C and group recipients.
@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 3, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #16937 and #15215 — same fix for QQBot C2C/group endpoint routing in send_message. Also overlaps with #17971.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #16937 and #15215 — same fix for QQBot C2C/group endpoint routing.

@teknium1

teknium1 commented May 3, 2026

Copy link
Copy Markdown
Contributor

Salvaged via #19422 onto current main — your commit's authorship was preserved. Thanks @kiala9!

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.

4 participants