Test: add threadTs passthrough test for Slack sendMessage

This commit is contained in:
Austin Mudd
2026-01-07 23:30:30 -08:00
committed by Peter Steinberger
parent 1be8d06cca
commit 29e6f13b29

View File

@@ -110,4 +110,21 @@ describe("handleSlackAction", () => {
),
).rejects.toThrow(/Slack reactions are disabled/);
});
it("passes threadTs to sendSlackMessage for thread replies", async () => {
const cfg = { slack: { botToken: "tok" } } as ClawdbotConfig;
await handleSlackAction(
{
action: "sendMessage",
to: "channel:C123",
content: "Hello thread",
threadTs: "1234567890.123456",
},
cfg,
);
expect(sendSlackMessage).toHaveBeenCalledWith("channel:C123", "Hello thread", {
mediaUrl: undefined,
threadTs: "1234567890.123456",
});
});
});