mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 05:52:45 +00:00
style: run oxfmt formatting on doctor-config-flow.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Steinberger
parent
304bfefaf9
commit
c89eb351ea
@@ -571,10 +571,7 @@ function maybeRepairOpenPolicyAllowFrom(cfg: OpenClawConfig): {
|
|||||||
const next = structuredClone(cfg);
|
const next = structuredClone(cfg);
|
||||||
const changes: string[] = [];
|
const changes: string[] = [];
|
||||||
|
|
||||||
const ensureWildcard = (
|
const ensureWildcard = (account: Record<string, unknown>, prefix: string) => {
|
||||||
account: Record<string, unknown>,
|
|
||||||
prefix: string,
|
|
||||||
) => {
|
|
||||||
const dmPolicy =
|
const dmPolicy =
|
||||||
(account.dmPolicy as string | undefined) ??
|
(account.dmPolicy as string | undefined) ??
|
||||||
((account.dm as Record<string, unknown> | undefined)?.policy as string | undefined);
|
((account.dm as Record<string, unknown> | undefined)?.policy as string | undefined);
|
||||||
@@ -622,10 +619,7 @@ function maybeRepairOpenPolicyAllowFrom(cfg: OpenClawConfig): {
|
|||||||
if (accounts && typeof accounts === "object") {
|
if (accounts && typeof accounts === "object") {
|
||||||
for (const [accountName, accountConfig] of Object.entries(accounts)) {
|
for (const [accountName, accountConfig] of Object.entries(accounts)) {
|
||||||
if (accountConfig && typeof accountConfig === "object") {
|
if (accountConfig && typeof accountConfig === "object") {
|
||||||
ensureWildcard(
|
ensureWildcard(accountConfig, `channels.${channelName}.accounts.${accountName}`);
|
||||||
accountConfig,
|
|
||||||
`channels.${channelName}.accounts.${accountName}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user