mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-22 15:58:11 +00:00
* fix(feishu): pass card_msg_content_type to get full card content When reading Feishu interactive card messages via getMessageFeishu, the API returns a degraded structure (title + 'upgrade client' prompt) unless card_msg_content_type=user_card_content is passed in params. Fixes #78289 * fix(feishu): request full card content for message reads --------- Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com>
This commit is contained in:
@@ -200,6 +200,10 @@ describe("getMessageFeishu", () => {
|
||||
messageId: "om_1",
|
||||
});
|
||||
|
||||
expect(mockClientGet).toHaveBeenCalledWith({
|
||||
params: { card_msg_content_type: "user_card_content" },
|
||||
path: { message_id: "om_1" },
|
||||
});
|
||||
expect(result).toEqual({
|
||||
messageId: "om_1",
|
||||
chatId: "oc_1",
|
||||
@@ -470,6 +474,15 @@ describe("getMessageFeishu", () => {
|
||||
rootMessageId: "om_root",
|
||||
});
|
||||
|
||||
expect(mockClientList).toHaveBeenCalledWith({
|
||||
params: {
|
||||
container_id_type: "thread",
|
||||
container_id: "omt_1",
|
||||
sort_type: "ByCreateTimeDesc",
|
||||
page_size: 21,
|
||||
card_msg_content_type: "user_card_content",
|
||||
},
|
||||
});
|
||||
expect(result).toEqual([
|
||||
{
|
||||
messageId: "om_file",
|
||||
|
||||
@@ -414,6 +414,7 @@ export async function getMessageFeishu(params: {
|
||||
|
||||
try {
|
||||
const response = (await client.im.message.get({
|
||||
params: { card_msg_content_type: "user_card_content" },
|
||||
path: { message_id: messageId },
|
||||
})) as FeishuGetMessageResponse;
|
||||
|
||||
@@ -477,6 +478,7 @@ export async function listFeishuThreadMessages(params: {
|
||||
// Results are reversed below to restore chronological order.
|
||||
sort_type: "ByCreateTimeDesc",
|
||||
page_size: Math.min(limit + 1, 50),
|
||||
card_msg_content_type: "user_card_content",
|
||||
},
|
||||
})) as {
|
||||
code?: number;
|
||||
|
||||
Reference in New Issue
Block a user