fix(slack): enforce replyToMode for auto-thread_ts and inline reply tags (#23839)

* Slack: respect replyToMode for auto-thread_ts and inline reply tags

* Update CHANGELOG.md
This commit is contained in:
Vincent Koc
2026-02-22 14:36:46 -05:00
committed by GitHub
parent 9f7c1686b4
commit 71c2c59c6c
6 changed files with 62 additions and 17 deletions

View File

@@ -443,7 +443,7 @@ describe("monitorSlackProvider tool results", () => {
expect(sendMock.mock.calls[0][2]).toMatchObject({ threadTs: "111.222" });
});
it("forces thread replies when replyToId is set", async () => {
it("ignores replyToId directive when replyToMode is off", async () => {
replyMock.mockResolvedValue({ text: "forced reply", replyToId: "555" });
slackTestState.config = {
messages: {
@@ -467,6 +467,20 @@ describe("monitorSlackProvider tool results", () => {
}),
});
expect(sendMock).toHaveBeenCalledTimes(1);
expect(sendMock.mock.calls[0][2]).toMatchObject({ threadTs: undefined });
});
it("keeps replyToId directive threading when replyToMode is all", async () => {
replyMock.mockResolvedValue({ text: "forced reply", replyToId: "555" });
setDirectMessageReplyMode("all");
await runSlackMessageOnce(monitorSlackProvider, {
event: makeSlackMessageEvent({
ts: "789",
}),
});
expect(sendMock).toHaveBeenCalledTimes(1);
expect(sendMock.mock.calls[0][2]).toMatchObject({ threadTs: "555" });
});