mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 14:58:56 +00:00
Approvals: align native runtime tests
This commit is contained in:
parent
7e2fc57858
commit
a51488c13c
2 changed files with 2 additions and 7 deletions
|
|
@ -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",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue