mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 20:00:42 +00:00
feishu extension: tighten reply target fallback semantics
(cherry picked from commit f85ec610f267020b66713c09e648ec004b2e26f1)
This commit is contained in:
@@ -155,6 +155,26 @@ describe("feishuOutbound.sendText local-image auto-convert", () => {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("falls back to threadId when replyToId is empty on sendText", async () => {
|
||||||
|
await sendText({
|
||||||
|
cfg: {} as any,
|
||||||
|
to: "chat_1",
|
||||||
|
text: "hello",
|
||||||
|
replyToId: " ",
|
||||||
|
threadId: "om_thread_2",
|
||||||
|
accountId: "main",
|
||||||
|
} as any);
|
||||||
|
|
||||||
|
expect(sendMessageFeishuMock).toHaveBeenCalledWith(
|
||||||
|
expect.objectContaining({
|
||||||
|
to: "chat_1",
|
||||||
|
text: "hello",
|
||||||
|
replyToMessageId: "om_thread_2",
|
||||||
|
accountId: "main",
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("feishuOutbound.sendText replyToId forwarding", () => {
|
describe("feishuOutbound.sendText replyToId forwarding", () => {
|
||||||
@@ -327,5 +347,13 @@ describe("feishuOutbound.sendMedia renderMode", () => {
|
|||||||
accountId: "main",
|
accountId: "main",
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
expect(sendMessageFeishuMock).toHaveBeenCalledWith(
|
||||||
|
expect.objectContaining({
|
||||||
|
to: "chat_1",
|
||||||
|
text: "caption",
|
||||||
|
replyToMessageId: "om_thread_1",
|
||||||
|
accountId: "main",
|
||||||
|
}),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user