fix: support text channel for summary reply and fix root_message_id extraction - #2
Open
Joe-rq wants to merge 2 commits into
Open
fix: support text channel for summary reply and fix root_message_id extraction#2Joe-rq wants to merge 2 commits into
Joe-rq wants to merge 2 commits into
Conversation
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.
自动审查结果❌ 自动审查发现需要修复的问题。 AI 审查服务暂时不可用,且本次 PR 超出低风险自动放行范围,已要求人工复核。
|
自动审查结果❌ 自动审查发现需要修复的问题。 AI 审查服务暂时不可用,且本次 PR 超出低风险自动放行范围,已要求人工复核。
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:\n
python\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