@openclaw/zalo 2026.8.2 → 2026.9.1
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/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-DgD3ai3p.js";
|
|
2
|
-
import { t as zaloPlugin } from "./channel-
|
|
2
|
+
import { t as zaloPlugin } from "./channel-hG8iBI_S.js";
|
|
3
3
|
import { n as resolveZaloRuntimeGroupPolicy } from "./group-access-8qHRzDHx.js";
|
|
4
4
|
import { zaloSetupWizard } from "./setup-api.js";
|
|
5
5
|
export { createZaloSetupWizardProxy, resolveZaloRuntimeGroupPolicy, zaloDmPolicy, zaloPlugin, zaloSetupAdapter, zaloSetupWizard };
|
|
@@ -186,7 +186,7 @@ function looksLikeZaloChatId(raw, normalized) {
|
|
|
186
186
|
const target = normalizeZaloMessagingTarget(normalized ?? raw);
|
|
187
187
|
return Boolean(target);
|
|
188
188
|
}
|
|
189
|
-
const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
189
|
+
const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-jqx3Fyja.js"));
|
|
190
190
|
const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-D5xgPinc.js").then((n) => n.t)).zaloSetupWizard);
|
|
191
191
|
const zaloTextChunkLimit = 2e3;
|
|
192
192
|
async function sendZaloDelivery(ctx) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as zaloPlugin } from "./channel-
|
|
1
|
+
import { t as zaloPlugin } from "./channel-hG8iBI_S.js";
|
|
2
2
|
export { zaloPlugin };
|
|
@@ -69,7 +69,7 @@ async function startZaloGatewayAccount(ctx) {
|
|
|
69
69
|
setStatus: ctx.setStatus
|
|
70
70
|
});
|
|
71
71
|
ctx.log?.info(`[${account.accountId}] starting provider${zaloBotLabel} mode=${mode}`);
|
|
72
|
-
const { monitorZaloProvider } = await import("./monitor-
|
|
72
|
+
const { monitorZaloProvider } = await import("./monitor-0WIjv0t5.js");
|
|
73
73
|
return monitorZaloProvider({
|
|
74
74
|
token,
|
|
75
75
|
account,
|
|
@@ -8,7 +8,7 @@ import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtim
|
|
|
8
8
|
import { resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
9
9
|
import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
|
|
10
10
|
import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
|
|
11
|
-
import {
|
|
11
|
+
import { registerPluginHttpRoute, resolveWebhookPath } from "openclaw/plugin-sdk/webhook-ingress";
|
|
12
12
|
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
13
13
|
import { createChannelPartialDeliveryError, formatInboundMediaUnavailableText, resolveChannelInboundRouteEnvelope } from "openclaw/plugin-sdk/channel-inbound";
|
|
14
14
|
import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
@@ -169,7 +169,6 @@ const DEFAULT_MEDIA_MAX_MB = 5;
|
|
|
169
169
|
const WEBHOOK_CLEANUP_TIMEOUT_MS = 5e3;
|
|
170
170
|
const ZALO_TYPING_TIMEOUT_MS = 5e3;
|
|
171
171
|
const UNIX_MILLISECONDS_THRESHOLD = 0xe8d4a51000;
|
|
172
|
-
const hostedMediaRouteRefs = /* @__PURE__ */ new Map();
|
|
173
172
|
function resolveZaloTimestampMs(date) {
|
|
174
173
|
if (!date) return;
|
|
175
174
|
return date >= UNIX_MILLISECONDS_THRESHOLD ? date : date * 1e3;
|
|
@@ -181,8 +180,7 @@ const loadZaloWebhookModule = createLazyRuntimeModule(async () => ({
|
|
|
181
180
|
...await loadZaloWebhookIngressRuntime()
|
|
182
181
|
}));
|
|
183
182
|
function registerSharedHostedMediaRoute(params) {
|
|
184
|
-
|
|
185
|
-
const unregister = registerPluginHttpRoute({
|
|
183
|
+
return registerPluginHttpRoute({
|
|
186
184
|
auth: "plugin",
|
|
187
185
|
match: "prefix",
|
|
188
186
|
path: params.path,
|
|
@@ -199,23 +197,6 @@ function registerSharedHostedMediaRoute(params) {
|
|
|
199
197
|
}
|
|
200
198
|
}
|
|
201
199
|
});
|
|
202
|
-
const acquired = hostedMediaRouteRefs.get(routeKey) ?? {
|
|
203
|
-
count: 0,
|
|
204
|
-
unregisters: []
|
|
205
|
-
};
|
|
206
|
-
if (acquired.count === 0) hostedMediaRouteRefs.set(routeKey, acquired);
|
|
207
|
-
acquired.count += 1;
|
|
208
|
-
acquired.unregisters.push(unregister);
|
|
209
|
-
let released = false;
|
|
210
|
-
return () => {
|
|
211
|
-
if (released) return;
|
|
212
|
-
released = true;
|
|
213
|
-
if (hostedMediaRouteRefs.get(routeKey) !== acquired) return;
|
|
214
|
-
acquired.count -= 1;
|
|
215
|
-
if (acquired.count > 0) return;
|
|
216
|
-
hostedMediaRouteRefs.delete(routeKey);
|
|
217
|
-
for (const unregisterHandle of acquired.unregisters) unregisterHandle();
|
|
218
|
-
};
|
|
219
200
|
}
|
|
220
201
|
function formatZaloError(error) {
|
|
221
202
|
if (error instanceof Error) return error.stack ?? `${error.name}: ${error.message}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/zalo",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.9.1",
|
|
4
4
|
"description": "OpenClaw Zalo channel plugin for bot and webhook chats.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"openclaw": ">=2026.
|
|
11
|
+
"openclaw": ">=2026.9.1"
|
|
12
12
|
},
|
|
13
13
|
"peerDependenciesMeta": {
|
|
14
14
|
"openclaw": {
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
"minHostVersion": ">=2026.4.10"
|
|
83
83
|
},
|
|
84
84
|
"compat": {
|
|
85
|
-
"pluginApi": ">=2026.
|
|
85
|
+
"pluginApi": ">=2026.9.1"
|
|
86
86
|
},
|
|
87
87
|
"build": {
|
|
88
|
-
"openclawVersion": "2026.
|
|
88
|
+
"openclawVersion": "2026.9.1"
|
|
89
89
|
},
|
|
90
90
|
"release": {
|
|
91
91
|
"publishToClawHub": true,
|