openclaw - ✅(Solved) Fix [Bug] Feishu plugin: message read returns "[Interactive Card]" instead of actual card content [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78289Fetched 2026-05-07 03:38:47
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
2
Timeline (top)
mentioned ×3subscribed ×3commented ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #78302: fix(feishu): pass card_msg_content_type=user_card_content when fetching messages

Description (problem / solution / changelog)

Root cause

The Feishu GET message API returns a degraded stub ([Interactive Card]) by default. Passing card_msg_content_type=user_card_content makes it return the full card JSON (Card 1.0/2.0 format).

Both getMessageFeishu and listFeishuThreadMessages were missing this param, so parseInteractiveCardContent — which already handles Card 2.0 body.elements — never had real data to work with.

Change

  • getMessageFeishu: add params: { card_msg_content_type: 'user_card_content' } to client.im.message.get()
  • listFeishuThreadMessages: add card_msg_content_type: 'user_card_content' to the existing params object in client.im.message.list()
  • Tests: assert both API calls include the param; existing card content extraction tests also validate the parse layer still works correctly

Fixes

Fixes #78289

Changed files

  • extensions/feishu/src/send.test.ts (modified, +10/-0)
  • extensions/feishu/src/send.ts (modified, +2/-0)

Code Example

// 当前代码
const response = await client.im.message.get({ path: { message_id: messageId } });

// 建议修改为
const response = await client.im.message.get({ 
  path: { message_id: messageId }, 
  params: { card_msg_content_type: 'user_card_content' } 
});

---

// 当前代码
const response = await createFeishuClient(account).im.message.list({ params: {
  container_id_type: "thread",
  container_id: threadId,
  sort_type: "ByCreateTimeDesc",
  page_size: Math.min(limit + 1, 50)
} });

// 建议修改为
const response = await createFeishuClient(account).im.message.list({ params: {
  container_id_type: "thread",
  container_id: threadId,
  sort_type: "ByCreateTimeDesc",
  page_size: Math.min(limit + 1, 50),
  card_msg_content_type: 'user_card_content'
} });
RAW_BUFFERClick to expand / collapse

问题描述

当使用 OpenClaw 的 message(action=read) 工具读取飞书卡片消息时,返回的 content 只有 [Interactive Card],无法获取卡片的实际内容(markdown 正文等)。

根因分析

飞书 API 的 GET /open-apis/im/v1/messages/:message_id 有一个查询参数 card_msg_content_type

  • 不传(默认):返回降级结构,只有标题和 "请升级客户端" 提示
  • user_card_content:返回发送时的完整原始卡片 JSON(Card 1.0/2.0)

OpenClaw 飞书插件在两个函数中调用飞书 API 时都没有传递这个参数:

  1. getMessageFeishu(文件 send-DowxxbpH.js):
// 当前代码
const response = await client.im.message.get({ path: { message_id: messageId } });

// 建议修改为
const response = await client.im.message.get({ 
  path: { message_id: messageId }, 
  params: { card_msg_content_type: 'user_card_content' } 
});
  1. listFeishuThreadMessages
// 当前代码
const response = await createFeishuClient(account).im.message.list({ params: {
  container_id_type: "thread",
  container_id: threadId,
  sort_type: "ByCreateTimeDesc",
  page_size: Math.min(limit + 1, 50)
} });

// 建议修改为
const response = await createFeishuClient(account).im.message.list({ params: {
  container_id_type: "thread",
  container_id: threadId,
  sort_type: "ByCreateTimeDesc",
  page_size: Math.min(limit + 1, 50),
  card_msg_content_type: 'user_card_content'
} });

解析层已兼容

parseInteractiveCardContent 函数已经能处理 Card 2.0 的 body.elements 结构(支持 markdownlark_mddiv 等标签),只需要 API 层返回完整数据即可正确解析。

飞书官方文档参考

环境信息

  • OpenClaw: 2026.5.3
  • @openclaw/feishu: 2026.5.3
  • 飞书 SDK: @larksuiteoapi/node-sdk

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING