diff --git a/extensions/discord/src/approval-handler.runtime.test.ts b/extensions/discord/src/approval-handler.runtime.test.ts index 02c2e092b13..bbae3209370 100644 --- a/extensions/discord/src/approval-handler.runtime.test.ts +++ b/extensions/discord/src/approval-handler.runtime.test.ts @@ -1,4 +1,3 @@ -import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime"; import { describe, expect, it } from "vitest"; import { discordApprovalNativeRuntime } from "./approval-handler.runtime.js"; @@ -33,10 +32,7 @@ describe("discordApprovalNativeRuntime", () => { }); expect(prepared).toEqual({ - dedupeKey: buildChannelApprovalNativeTargetKey({ - to: "123456789", - threadId: "777888999", - }), + dedupeKey: "777888999", target: { discordChannelId: "777888999", }, diff --git a/extensions/discord/src/approval-handler.runtime.ts b/extensions/discord/src/approval-handler.runtime.ts index 1a8ce69618d..ab3a710b3e8 100644 --- a/extensions/discord/src/approval-handler.runtime.ts +++ b/extensions/discord/src/approval-handler.runtime.ts @@ -19,7 +19,6 @@ import type { PluginApprovalResolvedView, } from "openclaw/plugin-sdk/approval-handler-runtime"; import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime"; -import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime"; import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; import type { ExecApprovalActionDescriptor, @@ -512,7 +511,7 @@ export const discordApprovalNativeRuntime = createChannelApprovalNativeRuntimeAd ? plannedTarget.target.threadId.trim() : plannedTarget.target.to; return { - dedupeKey: buildChannelApprovalNativeTargetKey(plannedTarget.target), + dedupeKey: destinationId, target: { discordChannelId: destinationId, },