@openclaw/synology-chat 2026.5.27 → 2026.5.28-beta.2

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,3 +1,3 @@
1
- import { n as setSynologyRuntime, t as synologyChatPlugin } from "./channel-DCdPVZPg.js";
1
+ import { n as setSynologyRuntime, t as synologyChatPlugin } from "./channel-BxFQ9DgT.js";
2
2
  import { t as collectSynologyChatSecurityAuditFindings } from "./security-audit-DIsaxIaB.js";
3
3
  export { collectSynologyChatSecurityAuditFindings, setSynologyRuntime, synologyChatPlugin };
@@ -1,4 +1,4 @@
1
- import { i as resolveAccount, n as synologyChatSetupWizard, r as listAccountIds, t as synologyChatSetupAdapter } from "./setup-surface-DOgT7ce6.js";
1
+ import { i as resolveAccount, n as synologyChatSetupWizard, r as listAccountIds, t as synologyChatSetupAdapter } from "./setup-surface-DGoiOQR1.js";
2
2
  import { t as collectSynologyChatSecurityAuditFindings } from "./security-audit-DIsaxIaB.js";
3
3
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
4
4
  import { createHybridChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
@@ -205,8 +205,11 @@ function buildWebhookBody(payload, userId) {
205
205
  }
206
206
  function parseNumericUserId(userId) {
207
207
  if (userId === void 0) return;
208
- const numericId = typeof userId === "number" ? userId : Number.parseInt(userId, 10);
209
- return Number.isNaN(numericId) ? void 0 : numericId;
208
+ if (typeof userId === "number") return Number.isSafeInteger(userId) ? userId : void 0;
209
+ const trimmed = userId.trim();
210
+ if (!/^\d+$/.test(trimmed)) return;
211
+ const numericId = Number(trimmed);
212
+ return Number.isSafeInteger(numericId) ? numericId : void 0;
210
213
  }
211
214
  function doPost(url, body, allowInsecureSsl = false) {
212
215
  return new Promise((resolve, reject) => {
@@ -1,2 +1,2 @@
1
- import { t as synologyChatPlugin } from "./channel-DCdPVZPg.js";
1
+ import { t as synologyChatPlugin } from "./channel-BxFQ9DgT.js";
2
2
  export { synologyChatPlugin };
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as synologyChatSetupWizard, t as synologyChatSetupAdapter } from "./setup-surface-DOgT7ce6.js";
1
+ import { n as synologyChatSetupWizard, t as synologyChatSetupAdapter } from "./setup-surface-DGoiOQR1.js";
2
2
  export { synologyChatSetupAdapter, synologyChatSetupWizard };
@@ -1,6 +1,7 @@
1
1
  import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
2
2
  import { DEFAULT_ACCOUNT_ID, listCombinedAccountIds, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
3
3
  import { resolveDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
4
+ import { parseStrictInteger } from "openclaw/plugin-sdk/number-runtime";
4
5
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, createAllowFromSection, createSetupTranslator, createStandardChannelSetupStatus, formatDocsLink, mergeAllowFromEntries, normalizeAccountId, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
5
6
  //#region extensions/synology-chat/src/accounts.ts
6
7
  /**
@@ -32,11 +33,16 @@ function parseAllowedUserIds(raw) {
32
33
  if (Array.isArray(raw)) return raw.filter(Boolean);
33
34
  return normalizeStringEntries(raw.split(","));
34
35
  }
35
- function parseRateLimitPerMinute(raw) {
36
- if (raw == null) return 30;
36
+ function normalizeRateLimitPerMinuteValue(raw) {
37
+ if (typeof raw === "number") return Number.isSafeInteger(raw) && raw >= 0 ? raw : void 0;
38
+ if (typeof raw !== "string") return;
37
39
  const trimmed = raw.trim();
38
- if (!/^-?\d+$/.test(trimmed)) return 30;
39
- return Number.parseInt(trimmed, 10);
40
+ if (!/^\d+$/.test(trimmed)) return;
41
+ const parsed = parseStrictInteger(trimmed);
42
+ return parsed != null && parsed >= 0 ? parsed : void 0;
43
+ }
44
+ function parseRateLimitPerMinute(raw) {
45
+ return normalizeRateLimitPerMinuteValue(raw) ?? 30;
40
46
  }
41
47
  /**
42
48
  * List all configured account IDs for this channel.
@@ -91,7 +97,7 @@ function resolveAccount(cfg, accountId) {
91
97
  dangerouslyAllowInheritedWebhookPath,
92
98
  dmPolicy: merged.dmPolicy ?? "allowlist",
93
99
  allowedUserIds: parseAllowedUserIds(merged.allowedUserIds ?? envAllowedUserIds),
94
- rateLimitPerMinute: merged.rateLimitPerMinute ?? envRateLimitValue,
100
+ rateLimitPerMinute: normalizeRateLimitPerMinuteValue(merged.rateLimitPerMinute) ?? envRateLimitValue,
95
101
  botName: merged.botName ?? envBotName,
96
102
  allowInsecureSsl: merged.allowInsecureSsl ?? false
97
103
  };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/synology-chat",
3
- "version": "2026.5.27",
3
+ "version": "2026.5.28-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/synology-chat",
9
- "version": "2026.5.27",
9
+ "version": "2026.5.28-beta.2",
10
10
  "dependencies": {
11
11
  "zod": "4.4.3"
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/synology-chat",
3
- "version": "2026.5.27",
3
+ "version": "2026.5.28-beta.2",
4
4
  "description": "Synology Chat channel plugin for OpenClaw channels and direct messages.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,10 +27,10 @@
27
27
  "minHostVersion": ">=2026.4.10"
28
28
  },
29
29
  "compat": {
30
- "pluginApi": ">=2026.5.27"
30
+ "pluginApi": ">=2026.5.28-beta.2"
31
31
  },
32
32
  "build": {
33
- "openclawVersion": "2026.5.27"
33
+ "openclawVersion": "2026.5.28-beta.2"
34
34
  },
35
35
  "release": {
36
36
  "publishToClawHub": true,
@@ -50,7 +50,7 @@
50
50
  "npm-shrinkwrap.json"
51
51
  ],
52
52
  "peerDependencies": {
53
- "openclaw": ">=2026.5.27"
53
+ "openclaw": ">=2026.5.28-beta.2"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "openclaw": {