feishu extension: tighten reply target fallback semantics

(cherry picked from commit f85ec610f267020b66713c09e648ec004b2e26f1)
This commit is contained in:
bmendonca3
2026-03-03 16:03:50 -07:00
committed by Tak Hoffman
parent c9d8c72ebb
commit b718bcdd2d

View File

@@ -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", () => {
@@ -327,5 +347,13 @@ describe("feishuOutbound.sendMedia renderMode", () => {
accountId: "main",
}),
);
expect(sendMessageFeishuMock).toHaveBeenCalledWith(
expect.objectContaining({
to: "chat_1",
text: "caption",
replyToMessageId: "om_thread_1",
accountId: "main",
}),
);
});
});