Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(card): force header module to use plain text type #201

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

3TUSK
Copy link
Contributor

@3TUSK 3TUSK commented Feb 24, 2023

根据 KOOK 的文档:

标题模块只能支持展示标准文本(text),突出标题样式。

实际使用中,若直接在构造 Moulde.Header 对象时使用类型为 Types.Text.KMDElement.Text 对象,如此生成的卡片消息最终会导致远端服务器报错。

因此本 PR 尝试通过复制一份 Element.Text 对象,并强制指定类型为 Types.Text.PLAIN 来满足这一约束。

Copy link
Owner

@TWT233 TWT233 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TWT233 TWT233 merged commit 99b74b2 into TWT233:main Feb 24, 2023
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