mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-30 01:06:11 +00:00
Slack: infer interaction channel type from channel ID
This commit is contained in:
@@ -87,7 +87,7 @@ function createContext() {
|
||||
describe("registerSlackInteractionEvents", () => {
|
||||
it("enqueues structured events and updates button rows", async () => {
|
||||
enqueueSystemEventMock.mockReset();
|
||||
const { ctx, app, getHandler } = createContext();
|
||||
const { ctx, app, getHandler, resolveSessionKey } = createContext();
|
||||
registerSlackInteractionEvents({ ctx: ctx as never });
|
||||
|
||||
const handler = getHandler();
|
||||
@@ -142,6 +142,10 @@ describe("registerSlackInteractionEvents", () => {
|
||||
channelId: "C1",
|
||||
messageTs: "100.200",
|
||||
});
|
||||
expect(resolveSessionKey).toHaveBeenCalledWith({
|
||||
channelId: "C1",
|
||||
channelType: undefined,
|
||||
});
|
||||
expect(app.client.chat.update).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ export function registerSlackInteractionEvents(params: { ctx: SlackMonitorContex
|
||||
// Pass undefined (not "unknown") to allow proper main session fallback
|
||||
const sessionKey = ctx.resolveSlackSystemEventSessionKey({
|
||||
channelId: channelId,
|
||||
channelType: "channel",
|
||||
channelType: undefined,
|
||||
});
|
||||
|
||||
// Build context key - only include defined values to avoid "unknown" noise
|
||||
|
||||
Reference in New Issue
Block a user