mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 18:51:04 +00:00
24 lines
858 B
TypeScript
24 lines
858 B
TypeScript
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
|
|
import type { ExecApprovalReplyDecision } from "openclaw/plugin-sdk/approval-runtime";
|
|
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
|
import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
|
|
export { isApprovalNotFoundError };
|
|
|
|
export async function resolveMatrixApproval(params: {
|
|
cfg: OpenClawConfig;
|
|
approvalId: string;
|
|
decision: ExecApprovalReplyDecision;
|
|
senderId?: string | null;
|
|
gatewayUrl?: string;
|
|
}): Promise<void> {
|
|
await resolveApprovalOverGateway({
|
|
cfg: params.cfg,
|
|
approvalId: params.approvalId,
|
|
decision: params.decision,
|
|
senderId: params.senderId,
|
|
gatewayUrl: params.gatewayUrl,
|
|
clientDisplayName: `Matrix approval (${params.senderId?.trim() || "unknown"})`,
|
|
});
|
|
}
|