Skip to content

fix: support text channel for summary reply and fix root_message_id extraction - #2

Open
Joe-rq wants to merge 2 commits into
mileson:mainfrom
Joe-rq:main
Open

fix: support text channel for summary reply and fix root_message_id extraction#2
Joe-rq wants to merge 2 commits into
mileson:mainfrom
Joe-rq:main

Conversation

@Joe-rq

@Joe-rq Joe-rq commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Bug Fixes\n\n### 1. Fix root_message_id extraction\nThe original code used incorrect path to extract root_message_id from response_meta.\n\nBefore:\npython\nroot_message_id = ((response_meta or {}).get("data") or {}).get("root_id")\n\n\nAfter:\npython\nroot_message_id = ((response_meta or {}).get("data") or {}).get("root_id") or ((response_meta or {}).get("data") or {}).get("message_id")\n\n\n### 2. Support configurable msg_type for summary reply\nThe original code hardcoded msg_type as "post" for summary reply, ignoring the template configuration.\n\nChanges:\n- Added support for channel: "text" in summary_reply config\n- Added build_summary_text() function for generating text format content\n- Falls back to "post" type if not specified\n\n### 3. New build_summary_text() function\nGenerates plain text format for reply messages:\n- Supports @ mentions\n- Formatted bullet points\n- Optional footer\n\n## Testing\n- [x] Tested with text channel config\n- [x] Verified root_message_id extraction works correctly\n- [x] Both main message and summary reply sent successfully

The function was returning:
  {"title": ..., "content": ...}

But Feishu reply API requires post type to be wrapped in zh_cn:
  {"post": {"zh_cn": {"title": ..., "content": ...}}}

This fixes the 'content format of the post type is incorrect' error (code 230001)
when sending summary replies in thread mode.
@github-actions

Copy link
Copy Markdown

自动审查结果

❌ 自动审查发现需要修复的问题。

AI 审查服务暂时不可用,且本次 PR 超出低风险自动放行范围,已要求人工复核。

@github-actions

Copy link
Copy Markdown

自动审查结果

❌ 自动审查发现需要修复的问题。

AI 审查服务暂时不可用,且本次 PR 超出低风险自动放行范围,已要求人工复核。

  • [medium] src/openclaw_feishu_cron_kit/core.py, src/openclaw_feishu_cron_kit/renderer.py 需要人工复核: AI 审查服务不可用(HTTPSConnectionPool(host='aicode.cat', port=443): Max retries exceeded with url: /v1/responses (Caused by ConnectTimeoutError(<HTTPSConnection(host='aicode.cat', port=443) at 0x7fa0c24b9250>, 'Connection to aicode.cat timed out. (connect timeout=180)'))),且本次改动文件或变更规模超出低风险自动合并白名单。

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.

1 participant