Skip to content

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

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-8c54fd4a
May 3, 2026
Merged

fix(send_message): support QQBot C2C and group chats#19422
teknium1 merged 1 commit into
mainfrom
hermes/hermes-8c54fd4a

Conversation

@teknium1

@teknium1 teknium1 commented May 3, 2026

Copy link
Copy Markdown
Contributor

Salvage of #19230 by @kiala9 onto current main.

Summary

_send_qqbot was hardcoded to the guild channel endpoint (/channels/{id}/messages), which fails for C2C private chats and QQ groups with 频道不存在 (code 11263). Try the three endpoints in order: channel → C2C (/v2/users/...) → group (/v2/groups/...).

Changes

  • tools/send_message_tool.py: 3-endpoint fallback probe (+25/-5)
  • scripts/release.py: AUTHOR_MAP entry for @kiala9

Validation

scripts/run_tests.sh tests/tools/ -k send_message → 114 passed

Original PR: #19230

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.
@teknium1
teknium1 merged commit 3792b77 into main May 3, 2026
9 of 10 checks passed
@teknium1
teknium1 deleted the hermes/hermes-8c54fd4a branch May 3, 2026 23:54
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists platform/qqbot QQ Bot adapter labels May 4, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This salvage PR supersedes #17971, #16937, and #15215 — all fix the same QQBot C2C/group endpoint routing gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants