@openclaw-china/wecom-app 0.1.14 → 0.1.15
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 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8794,6 +8794,25 @@ var wecomAppPlugin = {
|
|
|
8794
8794
|
webhookPath: path,
|
|
8795
8795
|
lastStartAt: Date.now()
|
|
8796
8796
|
});
|
|
8797
|
+
try {
|
|
8798
|
+
await new Promise((resolve) => {
|
|
8799
|
+
if (ctx.abortSignal?.aborted) {
|
|
8800
|
+
resolve();
|
|
8801
|
+
return;
|
|
8802
|
+
}
|
|
8803
|
+
if (!ctx.abortSignal) {
|
|
8804
|
+
return;
|
|
8805
|
+
}
|
|
8806
|
+
ctx.abortSignal.addEventListener("abort", () => resolve(), { once: true });
|
|
8807
|
+
});
|
|
8808
|
+
} finally {
|
|
8809
|
+
const current = unregisterHooks.get(ctx.accountId);
|
|
8810
|
+
if (current === unregister) {
|
|
8811
|
+
unregisterHooks.delete(ctx.accountId);
|
|
8812
|
+
}
|
|
8813
|
+
unregister();
|
|
8814
|
+
ctx.setStatus?.({ accountId: ctx.accountId, running: false, lastStopAt: Date.now() });
|
|
8815
|
+
}
|
|
8797
8816
|
},
|
|
8798
8817
|
stopAccount: async (ctx) => {
|
|
8799
8818
|
const unregister = unregisterHooks.get(ctx.accountId);
|