feat: simplify Feishu card config and update 2.1.4 docs

This commit is contained in:
zhayujie
2026-07-19 13:15:47 +08:00
parent 0783d64f1f
commit 0c76d851cb
11 changed files with 198 additions and 110 deletions

View File

@@ -48,9 +48,9 @@ def build_markdown_card(text: str) -> dict:
}
def build_text_delivery(text: str, enabled: bool = True) -> Tuple[str, str]:
def build_text_delivery(text: str) -> Tuple[str, str]:
"""Return the Feishu ``msg_type`` and serialized content for a text reply."""
if enabled and contains_markdown(text):
if contains_markdown(text):
return "interactive", json.dumps(build_markdown_card(text), ensure_ascii=False)
return "text", json.dumps({"text": text}, ensure_ascii=False)