mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 15:58:27 +00:00
chore: remove unused channelName parameter from ensureWildcard
Addresses review feedback — channelName was declared but only prefix was used for change messages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Steinberger
parent
b05273de61
commit
304bfefaf9
@@ -572,7 +572,6 @@ function maybeRepairOpenPolicyAllowFrom(cfg: OpenClawConfig): {
|
|||||||
const changes: string[] = [];
|
const changes: string[] = [];
|
||||||
|
|
||||||
const ensureWildcard = (
|
const ensureWildcard = (
|
||||||
channelName: string,
|
|
||||||
account: Record<string, unknown>,
|
account: Record<string, unknown>,
|
||||||
prefix: string,
|
prefix: string,
|
||||||
) => {
|
) => {
|
||||||
@@ -616,7 +615,7 @@ function maybeRepairOpenPolicyAllowFrom(cfg: OpenClawConfig): {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check the top-level channel config
|
// Check the top-level channel config
|
||||||
ensureWildcard(channelName, channelConfig, `channels.${channelName}`);
|
ensureWildcard(channelConfig, `channels.${channelName}`);
|
||||||
|
|
||||||
// Check per-account configs (e.g. channels.discord.accounts.mybot)
|
// Check per-account configs (e.g. channels.discord.accounts.mybot)
|
||||||
const accounts = channelConfig.accounts as Record<string, Record<string, unknown>> | undefined;
|
const accounts = channelConfig.accounts as Record<string, Record<string, unknown>> | undefined;
|
||||||
@@ -624,7 +623,6 @@ function maybeRepairOpenPolicyAllowFrom(cfg: OpenClawConfig): {
|
|||||||
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(
|
||||||
channelName,
|
|
||||||
accountConfig,
|
accountConfig,
|
||||||
`channels.${channelName}.accounts.${accountName}`,
|
`channels.${channelName}.accounts.${accountName}`,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user