@openclaw-china/wecom-app 0.1.14 → 0.1.16
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.js +19 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6049,14 +6049,6 @@ async function configureQQBot(prompter, cfg) {
|
|
|
6049
6049
|
existingValue: toTrimmedString(existing.clientSecret),
|
|
6050
6050
|
required: true
|
|
6051
6051
|
});
|
|
6052
|
-
Ve(
|
|
6053
|
-
"QQ \u7684 Markdown \u4F53\u9A8C\u5F88\u597D\uFF0C\u4F46\u9700\u8981\u5148\u7533\u8BF7\u5F00\u901A\uFF0C\u8BE6\u60C5\u8BF7\u67E5\u770B\u914D\u7F6E\u6587\u6863\u3002",
|
|
6054
|
-
"\u63D0\u793A"
|
|
6055
|
-
);
|
|
6056
|
-
const markdownSupport = await prompter.askConfirm(
|
|
6057
|
-
"\u542F\u7528 Markdown \u652F\u6301",
|
|
6058
|
-
toBoolean(existing.markdownSupport, false)
|
|
6059
|
-
);
|
|
6060
6052
|
const asrEnabled = await prompter.askConfirm(
|
|
6061
6053
|
"\u542F\u7528 ASR\uFF08\u652F\u6301\u5165\u7AD9\u8BED\u97F3\u81EA\u52A8\u8F6C\u6587\u5B57\uFF09",
|
|
6062
6054
|
toBoolean(existingAsr.enabled, false)
|
|
@@ -6085,7 +6077,6 @@ async function configureQQBot(prompter, cfg) {
|
|
|
6085
6077
|
return mergeChannelConfig(cfg, "qqbot", {
|
|
6086
6078
|
appId,
|
|
6087
6079
|
clientSecret,
|
|
6088
|
-
markdownSupport,
|
|
6089
6080
|
asr
|
|
6090
6081
|
});
|
|
6091
6082
|
}
|
|
@@ -8794,6 +8785,25 @@ var wecomAppPlugin = {
|
|
|
8794
8785
|
webhookPath: path,
|
|
8795
8786
|
lastStartAt: Date.now()
|
|
8796
8787
|
});
|
|
8788
|
+
try {
|
|
8789
|
+
await new Promise((resolve) => {
|
|
8790
|
+
if (ctx.abortSignal?.aborted) {
|
|
8791
|
+
resolve();
|
|
8792
|
+
return;
|
|
8793
|
+
}
|
|
8794
|
+
if (!ctx.abortSignal) {
|
|
8795
|
+
return;
|
|
8796
|
+
}
|
|
8797
|
+
ctx.abortSignal.addEventListener("abort", () => resolve(), { once: true });
|
|
8798
|
+
});
|
|
8799
|
+
} finally {
|
|
8800
|
+
const current = unregisterHooks.get(ctx.accountId);
|
|
8801
|
+
if (current === unregister) {
|
|
8802
|
+
unregisterHooks.delete(ctx.accountId);
|
|
8803
|
+
}
|
|
8804
|
+
unregister();
|
|
8805
|
+
ctx.setStatus?.({ accountId: ctx.accountId, running: false, lastStopAt: Date.now() });
|
|
8806
|
+
}
|
|
8797
8807
|
},
|
|
8798
8808
|
stopAccount: async (ctx) => {
|
|
8799
8809
|
const unregister = unregisterHooks.get(ctx.accountId);
|