Skip to content

Commit ccf54f2

Browse files
committed
refactor: route slack interactions through channel runtime
1 parent 16f8616 commit ccf54f2

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

extensions/slack/src/monitor/events/interactions.block-actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { SlackActionMiddlewareArgs } from "@slack/bolt";
22
import type { Block, KnownBlock } from "@slack/web-api";
3+
import { enqueueSystemEvent } from "openclaw/plugin-sdk/channel-runtime";
34
import {
45
buildPluginBindingResolvedText,
56
parsePluginBindingApprovalCustomId,
67
resolvePluginConversationBindingApproval,
78
} from "openclaw/plugin-sdk/conversation-runtime";
8-
import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime";
99
import { dispatchPluginInteractiveHandler } from "openclaw/plugin-sdk/plugin-runtime";
1010
import { SLACK_REPLY_BUTTON_ACTION_ID, SLACK_REPLY_SELECT_ACTION_ID } from "../../blocks-render.js";
1111
import { authorizeSlackSystemEventSender } from "../auth.js";

extensions/slack/src/monitor/events/interactions.modal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime";
1+
import { enqueueSystemEvent } from "openclaw/plugin-sdk/channel-runtime";
22
import { parseSlackModalPrivateMetadata } from "../../modal-metadata.js";
33
import { authorizeSlackSystemEventSender } from "../auth.js";
44
import type { SlackMonitorContext } from "../context.js";

extensions/slack/src/monitor/events/interactions.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ function createContext(overrides?: {
167167
describe("registerSlackInteractionEvents", () => {
168168
beforeAll(async () => {
169169
vi.resetModules();
170-
const infraRuntime = await import("openclaw/plugin-sdk/infra-runtime");
170+
const channelRuntime = await import("openclaw/plugin-sdk/channel-runtime");
171171
const pluginRuntime = await import("openclaw/plugin-sdk/plugin-runtime");
172172
const conversationBinding = await import("../../../../../src/plugins/conversation-binding.js");
173173
enqueueSystemEventSpy = vi
174-
.spyOn(infraRuntime, "enqueueSystemEvent")
175-
.mockImplementation(((...args: Parameters<typeof infraRuntime.enqueueSystemEvent>) =>
174+
.spyOn(channelRuntime, "enqueueSystemEvent")
175+
.mockImplementation(((...args: Parameters<typeof channelRuntime.enqueueSystemEvent>) =>
176176
(enqueueSystemEventMock as (...innerArgs: unknown[]) => boolean)(
177177
...args,
178-
)) as typeof infraRuntime.enqueueSystemEvent);
178+
)) as typeof channelRuntime.enqueueSystemEvent);
179179
dispatchPluginInteractiveHandlerSpy = vi
180180
.spyOn(pluginRuntime, "dispatchPluginInteractiveHandler")
181181
.mockImplementation(((

0 commit comments

Comments
 (0)