mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 18:41:10 +00:00
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:
@@ -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" });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user