Test: add threadTs passthrough test for Slack sendMessage
This commit is contained in:
committed by
Peter Steinberger
parent
1be8d06cca
commit
29e6f13b29
@@ -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",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user