@lanmers/wecom-openclaw-plugin-agents 3.0.0 → 4.0.0
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/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2342,11 +2342,11 @@ const dmPolicy = {
|
|
|
2342
2342
|
return account?.config.dmPolicy ?? "open";
|
|
2343
2343
|
},
|
|
2344
2344
|
setPolicy: (cfg, policy, accountId) => {
|
|
2345
|
-
const channelId = accountId ? makeChannelId(accountId) : CHANNEL_ID;
|
|
2345
|
+
const channelId = (accountId ?? null) ? makeChannelId(accountId) : CHANNEL_ID;
|
|
2346
2346
|
return setWeComDmPolicy(cfg, channelId, policy);
|
|
2347
2347
|
},
|
|
2348
2348
|
promptAllowFrom: async ({ cfg, prompter, accountId }) => {
|
|
2349
|
-
const channelId = accountId ? makeChannelId(accountId) : CHANNEL_ID;
|
|
2349
|
+
const channelId = (accountId ?? null) ? makeChannelId(accountId) : CHANNEL_ID;
|
|
2350
2350
|
const account = resolveWeComAccountByChannelId(cfg, channelId);
|
|
2351
2351
|
if (!account) {
|
|
2352
2352
|
return cfg;
|
|
@@ -2388,7 +2388,7 @@ const wecomOnboardingAdapter = {
|
|
|
2388
2388
|
},
|
|
2389
2389
|
configure: async ({ cfg, prompter, forceAllowFrom, accountId }) => {
|
|
2390
2390
|
// 如果指定了 accountId,则使用该 Agent;否则创建新 Agent
|
|
2391
|
-
let targetAccountId = accountId;
|
|
2391
|
+
let targetAccountId = accountId ?? undefined;
|
|
2392
2392
|
const channelIds = listWeComChannelIds(cfg);
|
|
2393
2393
|
const existingNames = channelIds.map(id => {
|
|
2394
2394
|
// 提取账户名(wecom-bot1 -> bot1)
|