Skip to content

feat(im/convert): support content_v2 blocks in post message conversion#2

Merged
liujiashu-shiro merged 1 commit into
mainfrom
feat/content-v2-support
Jun 17, 2026
Merged

feat(im/convert): support content_v2 blocks in post message conversion#2
liujiashu-shiro merged 1 commit into
mainfrom
feat/content-v2-support

Conversation

@liujiashu-shiro

Copy link
Copy Markdown
Collaborator

Summary

This change adds support for converting content_v2 blocks in post messages and changes the default Markdown conversion mode from structured to native, preserving Feishu/Lark client-native Markdown rendering.

Changes

  • Prefer content_v2 when flattening PostContent, with fallback to legacy content
  • Post-process tag: md text to resolve mentions, extract Markdown image resources, and preserve paired code-fence contents
  • Change the default MarkdownConverter.tag_md_mode and markdown_to_post_ast mode to native
  • Update sender, Markdown conversion, media caption, and native mode tests for the new default behavior
  • Add regression coverage for content_v2, mentions, image resources, and code-fence handling

Test Plan

  • Unit tests pass
  • Manually verify the lark xxx command works locally
  • Verify post messages with content_v2 Markdown, mentions, and images convert correctly

Related Issues

N/A

@liujiashu-shiro liujiashu-shiro merged commit 6435d12 into main Jun 17, 2026
13 checks passed
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