mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
fix(zalo): align setup allowlist prompts with shared dm policy
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
type ChannelSetupWizard,
|
||||
type OpenClawConfig,
|
||||
} from "openclaw/plugin-sdk/setup";
|
||||
import { resolveZaloAccount } from "./accounts.js";
|
||||
import { resolveDefaultZaloAccountId, resolveZaloAccount } from "./accounts.js";
|
||||
|
||||
type ZaloAccountSetupConfig = {
|
||||
enabled?: boolean;
|
||||
@@ -32,7 +32,8 @@ export async function promptZaloAllowFrom(params: {
|
||||
prompter: Parameters<NonNullable<ChannelSetupDmPolicy["promptAllowFrom"]>>[0]["prompter"];
|
||||
accountId?: string;
|
||||
}): Promise<OpenClawConfig> {
|
||||
const { cfg, prompter, accountId = DEFAULT_ACCOUNT_ID } = params;
|
||||
const { cfg, prompter } = params;
|
||||
const accountId = params.accountId ?? resolveDefaultZaloAccountId(cfg);
|
||||
const resolved = resolveZaloAccount({ cfg, accountId });
|
||||
const existingAllowFrom = resolved.config.allowFrom ?? [];
|
||||
const entry = await prompter.text({
|
||||
|
||||
Reference in New Issue
Block a user