@openclaw/zalouser 2026.2.22 → 2026.2.24

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.2.24
4
+
5
+ ### Changes
6
+
7
+ - Version alignment with core OpenClaw release numbers.
8
+
3
9
  ## 2026.2.22
4
10
 
5
11
  ### Changes
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@openclaw/zalouser",
3
- "version": "2026.2.22",
3
+ "version": "2026.2.24",
4
4
  "description": "OpenClaw Zalo Personal Account plugin via zca-cli",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "@sinclair/typebox": "0.34.48"
8
8
  },
9
- "devDependencies": {
10
- "openclaw": "workspace:*"
11
- },
12
9
  "openclaw": {
13
10
  "extensions": [
14
11
  "./index.ts"
package/src/monitor.ts CHANGED
@@ -1,11 +1,18 @@
1
1
  import type { ChildProcess } from "node:child_process";
2
- import type { OpenClawConfig, MarkdownTableMode, RuntimeEnv } from "openclaw/plugin-sdk";
2
+ import type {
3
+ MarkdownTableMode,
4
+ OpenClawConfig,
5
+ OutboundReplyPayload,
6
+ RuntimeEnv,
7
+ } from "openclaw/plugin-sdk";
3
8
  import {
4
9
  createReplyPrefixOptions,
10
+ resolveOutboundMediaUrls,
5
11
  mergeAllowlist,
6
12
  resolveOpenProviderRuntimeGroupPolicy,
7
13
  resolveDefaultGroupPolicy,
8
14
  resolveSenderCommandAuthorization,
15
+ sendMediaWithLeadingCaption,
9
16
  summarizeMapping,
10
17
  warnMissingProviderGroupPolicyFallbackOnce,
11
18
  } from "openclaw/plugin-sdk";
@@ -392,7 +399,7 @@ async function processMessage(
392
399
  }
393
400
 
394
401
  async function deliverZalouserReply(params: {
395
- payload: { text?: string; mediaUrls?: string[]; mediaUrl?: string };
402
+ payload: OutboundReplyPayload;
396
403
  profile: string;
397
404
  chatId: string;
398
405
  isGroup: boolean;
@@ -408,29 +415,23 @@ async function deliverZalouserReply(params: {
408
415
  const tableMode = params.tableMode ?? "code";
409
416
  const text = core.channel.text.convertMarkdownTables(payload.text ?? "", tableMode);
410
417
 
411
- const mediaList = payload.mediaUrls?.length
412
- ? payload.mediaUrls
413
- : payload.mediaUrl
414
- ? [payload.mediaUrl]
415
- : [];
416
-
417
- if (mediaList.length > 0) {
418
- let first = true;
419
- for (const mediaUrl of mediaList) {
420
- const caption = first ? text : undefined;
421
- first = false;
422
- try {
423
- logVerbose(core, runtime, `Sending media to ${chatId}`);
424
- await sendMessageZalouser(chatId, caption ?? "", {
425
- profile,
426
- mediaUrl,
427
- isGroup,
428
- });
429
- statusSink?.({ lastOutboundAt: Date.now() });
430
- } catch (err) {
431
- runtime.error(`Zalouser media send failed: ${String(err)}`);
432
- }
433
- }
418
+ const sentMedia = await sendMediaWithLeadingCaption({
419
+ mediaUrls: resolveOutboundMediaUrls(payload),
420
+ caption: text,
421
+ send: async ({ mediaUrl, caption }) => {
422
+ logVerbose(core, runtime, `Sending media to ${chatId}`);
423
+ await sendMessageZalouser(chatId, caption ?? "", {
424
+ profile,
425
+ mediaUrl,
426
+ isGroup,
427
+ });
428
+ statusSink?.({ lastOutboundAt: Date.now() });
429
+ },
430
+ onError: (error) => {
431
+ runtime.error(`Zalouser media send failed: ${String(error)}`);
432
+ },
433
+ });
434
+ if (sentMedia) {
434
435
  return;
435
436
  }
436
437