Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions gateway/platforms/feishu.py
Original file line number Diff line number Diff line change
Expand Up @@ -4179,8 +4179,16 @@ def _build_outbound_payload(self, content: str) -> tuple[str, str]:
# table content as post causes the message to appear blank on the client.
# Force plain text for anything that looks like a markdown table.
if _MARKDOWN_TABLE_RE.search(content):
text_payload = {"text": content}
return "text", json.dumps(text_payload, ensure_ascii=False)
# JSON 2.0 card renders markdown tables natively with borders and alignment.
card = {
"schema": "2.0",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Current main relocated the active Feishu adapter to plugins/platforms/feishu/adapter.py in 552adbe0827c32df8ed9bb19e908c26eff43add7; its live table branch is now at :4524-4530. Port this change there and add a payload-selection regression test, since this old path no longer affects runtime behavior.

"body": {
"elements": [
{"tag": "markdown", "content": content}
]
},
}
return "interactive", json.dumps(card, ensure_ascii=False)
if _MARKDOWN_HINT_RE.search(content):
return "post", _build_markdown_post_payload(content)
text_payload = {"text": content}
Expand Down