@openclaw-china/wecom 0.1.27 → 0.1.28
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
|
@@ -8372,6 +8372,25 @@ var wecomPlugin = {
|
|
|
8372
8372
|
webhookPath: path5,
|
|
8373
8373
|
lastStartAt: Date.now()
|
|
8374
8374
|
});
|
|
8375
|
+
try {
|
|
8376
|
+
await new Promise((resolve3) => {
|
|
8377
|
+
if (ctx.abortSignal?.aborted) {
|
|
8378
|
+
resolve3();
|
|
8379
|
+
return;
|
|
8380
|
+
}
|
|
8381
|
+
if (!ctx.abortSignal) {
|
|
8382
|
+
return;
|
|
8383
|
+
}
|
|
8384
|
+
ctx.abortSignal.addEventListener("abort", () => resolve3(), { once: true });
|
|
8385
|
+
});
|
|
8386
|
+
} finally {
|
|
8387
|
+
const current = unregisterHooks.get(ctx.accountId);
|
|
8388
|
+
if (current === unregister) {
|
|
8389
|
+
unregisterHooks.delete(ctx.accountId);
|
|
8390
|
+
}
|
|
8391
|
+
unregister();
|
|
8392
|
+
ctx.setStatus?.({ accountId: ctx.accountId, running: false, lastStopAt: Date.now() });
|
|
8393
|
+
}
|
|
8375
8394
|
},
|
|
8376
8395
|
stopAccount: async (ctx) => {
|
|
8377
8396
|
const unregister = unregisterHooks.get(ctx.accountId);
|