@openclaw/zalouser 2026.2.25 → 2026.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.3.1
4
+
5
+ ### Changes
6
+
7
+ - Version alignment with core OpenClaw release numbers.
8
+
9
+ ## 2026.2.26
10
+
11
+ ### Changes
12
+
13
+ - Version alignment with core OpenClaw release numbers.
14
+
3
15
  ## 2026.2.25
4
16
 
5
17
  ### Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/zalouser",
3
- "version": "2026.2.25",
3
+ "version": "2026.3.1",
4
4
  "description": "OpenClaw Zalo Personal Account plugin via zca-cli",
5
5
  "type": "module",
6
6
  "dependencies": {
package/src/accounts.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import type { OpenClawConfig } from "openclaw/plugin-sdk";
2
- import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
2
+ import {
3
+ DEFAULT_ACCOUNT_ID,
4
+ normalizeAccountId,
5
+ normalizeOptionalAccountId,
6
+ } from "openclaw/plugin-sdk/account-id";
3
7
  import type { ResolvedZalouserAccount, ZalouserAccountConfig, ZalouserConfig } from "./types.js";
4
8
  import { runZca, parseJsonOutput } from "./zca.js";
5
9
 
@@ -21,8 +25,12 @@ export function listZalouserAccountIds(cfg: OpenClawConfig): string[] {
21
25
 
22
26
  export function resolveDefaultZalouserAccountId(cfg: OpenClawConfig): string {
23
27
  const zalouserConfig = cfg.channels?.zalouser as ZalouserConfig | undefined;
24
- if (zalouserConfig?.defaultAccount?.trim()) {
25
- return zalouserConfig.defaultAccount.trim();
28
+ const preferred = normalizeOptionalAccountId(zalouserConfig?.defaultAccount);
29
+ if (
30
+ preferred &&
31
+ listZalouserAccountIds(cfg).some((accountId) => normalizeAccountId(accountId) === preferred)
32
+ ) {
33
+ return preferred;
26
34
  }
27
35
  const ids = listZalouserAccountIds(cfg);
28
36
  if (ids.includes(DEFAULT_ACCOUNT_ID)) {
package/src/monitor.ts CHANGED
@@ -6,6 +6,7 @@ import type {
6
6
  RuntimeEnv,
7
7
  } from "openclaw/plugin-sdk";
8
8
  import {
9
+ createScopedPairingAccess,
9
10
  createReplyPrefixOptions,
10
11
  resolveOutboundMediaUrls,
11
12
  mergeAllowlist,
@@ -177,6 +178,11 @@ async function processMessage(
177
178
  statusSink?: (patch: { lastInboundAt?: number; lastOutboundAt?: number }) => void,
178
179
  ): Promise<void> {
179
180
  const { threadId, content, timestamp, metadata } = message;
181
+ const pairing = createScopedPairingAccess({
182
+ core,
183
+ channel: "zalouser",
184
+ accountId: account.accountId,
185
+ });
180
186
  if (!content?.trim()) {
181
187
  return;
182
188
  }
@@ -225,7 +231,7 @@ async function processMessage(
225
231
  configuredAllowFrom: configAllowFrom,
226
232
  senderId,
227
233
  isSenderAllowed,
228
- readAllowFromStore: () => core.channel.pairing.readAllowFromStore("zalouser"),
234
+ readAllowFromStore: pairing.readAllowFromStore,
229
235
  shouldComputeCommandAuthorized: (body, cfg) =>
230
236
  core.channel.commands.shouldComputeCommandAuthorized(body, cfg),
231
237
  resolveCommandAuthorizedFromAuthorizers: (params) =>
@@ -243,8 +249,7 @@ async function processMessage(
243
249
 
244
250
  if (!allowed) {
245
251
  if (dmPolicy === "pairing") {
246
- const { code, created } = await core.channel.pairing.upsertPairingRequest({
247
- channel: "zalouser",
252
+ const { code, created } = await pairing.upsertPairingRequest({
248
253
  id: senderId,
249
254
  meta: { name: senderName || undefined },
250
255
  });