Skip to content

fix: feishu P2P 单聊入站和出站修复#1

Merged
LinekForge merged 1 commit intoLinekForge:mainfrom
lightallspiritthing:fix/feishu-p2p
Apr 17, 2026
Merged

fix: feishu P2P 单聊入站和出站修复#1
LinekForge merged 1 commit intoLinekForge:mainfrom
lightallspiritthing:fix/feishu-p2p

Conversation

@lightallspiritthing
Copy link
Copy Markdown
Contributor

@lightallspiritthing lightallspiritthing commented Apr 17, 2026

Summary

  • pushMessagefromIdchatIdoc_)改为 senderIdou_),修复 P2P 入站 allowlist 不匹配
  • send() 根据 to 前缀选择 --chat-id / --user-id,修复 P2P 出站 lark-cli 报错
  • 未处理事件类型 graceful ignore,避免 bot_p2p_chat_entered_v1 误判通道 degraded

Test

飞书 P2P 单聊测试:

  • 入站消息 allowlist 通过
  • 出站回复成功
  • 打开聊天窗口不再导致通道 degraded

- pushMessage fromId 从 chatId 改为 senderId(P2P 入站 allowlist 匹配)
- send() 根据 to 前缀选择 --chat-id 或 --user-id(P2P 出站 lark-cli 兼容)
- 未处理事件类型(如 bot_p2p_chat_entered_v1)graceful ignore 不计 error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@LinekForge LinekForge merged commit 5ef3b29 into LinekForge:main Apr 17, 2026
LinekForge added a commit that referenced this pull request Apr 17, 2026
Four documentation patches surfacing gotchas Light hit on her first
clean install — each would otherwise re-trap every new user.

README.md:
- Prerequisites: clarify bun must be on PATH. Default install puts bun
  at ~/.bun/bin which isn't on macOS default PATH. Without this,
  `fh` CLI and the MCP subprocess both fail to resolve bun.
- [!IMPORTANT] block for server:hub mode: approval_channels must be
  configured before use. Without it every Bash/Write/Edit is auto-denied
  (see S1 commit for the code-side hint path).
- [!NOTE] block for first-run MCP tool approval: CC default behavior,
  /allowed-tools to persist. Without this hint users see "消息进来了
  但回不出去" on first use and blame forge-hub.

配置.md 飞书 section:
- Three sequential developer-console traps:
  1. im.message.receive_v1 associated permissions must be enabled in
     the event panel separately — "permission management" isn't enough.
  2. Bot capability needs to be enabled under 应用能力 → 机器人.
  3. Event/permission changes require publishing a new version to take
     effect, not just save.
  Light spent significant time on #1; documenting all three now.

Co-authored-by: Forge <270260515+ForgeLinek@users.noreply.github.com>
LinekForge added a commit that referenced this pull request Apr 20, 2026
Credit external contributors from PR #1 / #2 / #3.

Co-authored-by: Forge <270260515+ForgeLinek@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants