fix: harden outbound mirroring normalization

This commit is contained in:
Peter Steinberger
2026-01-24 12:51:29 +00:00
parent 8b4e40c602
commit 62c9255b6a
6 changed files with 60 additions and 2 deletions

View File

@@ -89,4 +89,30 @@ describe("runMessageAction Slack threading", () => {
const call = mocks.executeSendAction.mock.calls[0]?.[0];
expect(call?.ctx?.mirror?.sessionKey).toBe("agent:main:slack:channel:c123:thread:111.222");
});
it("matches auto-threading when channel ids differ in case", async () => {
mocks.executeSendAction.mockResolvedValue({
handledBy: "plugin",
payload: {},
});
await runMessageAction({
cfg: slackConfig,
action: "send",
params: {
channel: "slack",
target: "channel:c123",
message: "hi",
},
toolContext: {
currentChannelId: "C123",
currentThreadTs: "333.444",
replyToMode: "all",
},
agentId: "main",
});
const call = mocks.executeSendAction.mock.calls[0]?.[0];
expect(call?.ctx?.mirror?.sessionKey).toBe("agent:main:slack:channel:c123:thread:333.444");
});
});