Skip to content

fix: build_summary_post returns incorrect format for Feishu reply API - #1

Merged
github-actions[bot] merged 1 commit into
mileson:mainfrom
Joe-rq:main
Mar 11, 2026
Merged

fix: build_summary_post returns incorrect format for Feishu reply API#1
github-actions[bot] merged 1 commit into
mileson:mainfrom
Joe-rq:main

Conversation

@Joe-rq

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

Copy link
Copy Markdown
Contributor

Bug Description\n\nThe "build_summary_post()" function was returning a flat JSON structure:\n\n```json\n{\n "title": "...",\n "content": [...]\n}\n```\n\nBut the Feishu reply API requires the "post" type to be wrapped in a "zh_cn" structure:\n\n```json\n{\n "post": {\n "zh_cn": {\n "title": "...",\n "content": [...]\n }\n }\n}\n```\n\nThis caused error 230001: "content format of the post type is incorrect" when sending summary replies in thread mode.\n\n## Fix\n\nUpdated "build_summary_post()" in "src/openclaw_feishu_cron_kit/renderer.py" to return the correct nested structure.\n\n## Testing\n\n- [x] Verified the new format matches Feishu API requirements\n- [x] Tested locally with example payload\n\n## Related\n\nFixes the summary reply failure when using thread mode with "channel": "post".

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
github-actions Bot merged commit a937426 into mileson:main Mar 11, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

已通过自动审查并完成合并,感谢贡献。当前使用了低风险规则兜底审查,因为外部 AI 审查服务暂时不可用。

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