Skip to content

fix(feishu): infer receive_id_type from ID prefix in _send_raw_message#7694

Open
tomqiaozc wants to merge 1 commit into
NousResearch:mainfrom
tomqiaozc:user/Tom/fix-feishu-receive-id-type
Open

fix(feishu): infer receive_id_type from ID prefix in _send_raw_message#7694
tomqiaozc wants to merge 1 commit into
NousResearch:mainfrom
tomqiaozc:user/Tom/fix-feishu-receive-id-type

Conversation

@tomqiaozc

Copy link
Copy Markdown

Summary

  • _send_raw_message hardcoded receive_id_type="chat_id", causing Feishu API errors ([230001] invalid receive_id) when sending to user open_ids (ou_ prefix) or union_ids (on_ prefix)
  • Now infers the correct receive_id_type from the ID prefix, matching the existing pattern in _resolve_sender_name
  • Default remains "chat_id" for group chats (oc_ prefix), preserving backward compatibility

Fixes #7685

Test plan

  • Added parametric test verifying oc_xxx"chat_id", ou_xxx"open_id", on_xxx"union_id"
  • Existing Feishu tests unaffected (verified syntax validity)

🤖 Generated with Claude Code

The hardcoded "chat_id" caused API errors when sending to user
open_ids (ou_ prefix) or union_ids (on_ prefix). Now infers the
correct receive_id_type from the ID prefix, matching the existing
pattern in _resolve_sender_name.

Fixes NousResearch#7685

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists platform/feishu Feishu / Lark adapter comp/gateway Gateway runner, session dispatch, delivery labels Apr 29, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Multiple duplicate PRs for the same fix: #7769, #10040. All address #7685.

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/feishu Feishu / Lark adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(feishu): _send_raw_message hardcodes receive_id_type="chat_id", breaks delivery to open_id (ou_) targets

2 participants