@xiaozhi-pro/openclaw-plugin 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/accounts.js +3 -2
- package/package.json +1 -1
package/dist/src/accounts.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
2
|
-
import { normalizeLowercaseStringOrEmpty
|
|
2
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
+
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
3
4
|
import { XIAOZHI_PRO_WS_URL } from "./types.js";
|
|
4
5
|
export function listAccountIds(cfg) {
|
|
5
6
|
const section = cfg.channels?.["xiaozhi-pro"];
|
|
@@ -19,7 +20,7 @@ export function resolveAccount(cfg, accountId) {
|
|
|
19
20
|
enabled: raw.enabled !== false,
|
|
20
21
|
token: normalizeLowercaseStringOrEmpty(raw.token),
|
|
21
22
|
dmPolicy: raw.dmPolicy ?? "open",
|
|
22
|
-
allowedUserIds:
|
|
23
|
+
allowedUserIds: formatAllowFromLowercase(raw.allowedUserIds ?? raw.allowFrom),
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
/** 获取小智Pro WS URL(固定地址) */
|