@openclaw/nextcloud-talk 2026.6.11-beta.2 → 2026.7.1-beta.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,2 +1,2 @@
|
|
|
1
|
-
import { t as nextcloudTalkPlugin } from "./channel-
|
|
1
|
+
import { t as nextcloudTalkPlugin } from "./channel-C6wFKYpX.js";
|
|
2
2
|
export { nextcloudTalkPlugin };
|
|
@@ -13,7 +13,7 @@ import { buildSecretInputSchema, hasConfiguredSecretInput, normalizeResolvedSecr
|
|
|
13
13
|
import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
14
14
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
15
15
|
import { parseStrictNonNegativeInteger, parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
16
|
-
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
16
|
+
import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
17
17
|
import { createAccountStatusSink, createMessageReceiptFromOutboundResults, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
|
|
18
18
|
import { ssrfPolicyFromPrivateNetworkOptIn, ssrfPolicyFromPrivateNetworkOptIn as ssrfPolicyFromPrivateNetworkOptIn$1 } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
19
19
|
import { readFileSync } from "node:fs";
|
|
@@ -230,6 +230,7 @@ function generateNextcloudTalkSignature(params) {
|
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region extensions/nextcloud-talk/src/bot-preflight.ts
|
|
232
232
|
const BOT_FEATURE_RESPONSE = 2;
|
|
233
|
+
const BOT_PREFLIGHT_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
|
|
233
234
|
function normalizeUrlForMatch(value) {
|
|
234
235
|
if (!value?.trim()) return "";
|
|
235
236
|
try {
|
|
@@ -294,7 +295,7 @@ async function probeNextcloudTalkBotResponseFeature(params) {
|
|
|
294
295
|
});
|
|
295
296
|
try {
|
|
296
297
|
if (!response.ok) {
|
|
297
|
-
const body = await response
|
|
298
|
+
const body = await readResponseTextLimited(response, BOT_PREFLIGHT_ERROR_BODY_LIMIT_BYTES).catch(() => "");
|
|
298
299
|
return {
|
|
299
300
|
ok: false,
|
|
300
301
|
code: "api_error",
|
|
@@ -742,6 +743,22 @@ function looksLikeNextcloudTalkTargetId(raw) {
|
|
|
742
743
|
}
|
|
743
744
|
//#endregion
|
|
744
745
|
//#region extensions/nextcloud-talk/src/send.ts
|
|
746
|
+
const NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_BYTES = 8 * 1024;
|
|
747
|
+
const NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_CHARS = 200;
|
|
748
|
+
/** Collapses whitespace and caps an error-body prefix to a short, log-safe snippet. */
|
|
749
|
+
function collapseErrorSnippet(text) {
|
|
750
|
+
const collapsed = text.replace(/\s+/g, " ").trim();
|
|
751
|
+
if (collapsed.length > NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_CHARS) return `${collapsed.slice(0, NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_CHARS)}…`;
|
|
752
|
+
return collapsed;
|
|
753
|
+
}
|
|
754
|
+
/** Reads a bounded, collapsed error-body snippet without buffering hostile responses. */
|
|
755
|
+
async function readNextcloudTalkErrorSnippet(response) {
|
|
756
|
+
try {
|
|
757
|
+
return collapseErrorSnippet(await readResponseTextLimited(response, NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_BYTES));
|
|
758
|
+
} catch {
|
|
759
|
+
return "";
|
|
760
|
+
}
|
|
761
|
+
}
|
|
745
762
|
function resolveCredentials(explicit, account) {
|
|
746
763
|
const baseUrl = explicit.baseUrl?.trim() ?? account.baseUrl;
|
|
747
764
|
const secret = explicit.secret?.trim() ?? account.secret;
|
|
@@ -831,7 +848,7 @@ async function sendMessageNextcloudTalk(to, text, opts) {
|
|
|
831
848
|
});
|
|
832
849
|
try {
|
|
833
850
|
if (!response.ok) {
|
|
834
|
-
const errorBody = await response
|
|
851
|
+
const errorBody = await readNextcloudTalkErrorSnippet(response);
|
|
835
852
|
const status = response.status;
|
|
836
853
|
let errorMsg = `Nextcloud Talk send failed (${status})`;
|
|
837
854
|
if (status === 400) errorMsg = `Nextcloud Talk: bad request - ${errorBody || "invalid message format"}`;
|
|
@@ -844,7 +861,7 @@ async function sendMessageNextcloudTalk(to, text, opts) {
|
|
|
844
861
|
let messageId = "unknown";
|
|
845
862
|
let timestamp;
|
|
846
863
|
try {
|
|
847
|
-
const data = await response
|
|
864
|
+
const data = await readProviderJsonResponse(response, "Nextcloud Talk send");
|
|
848
865
|
if (data.ocs?.data?.id != null) messageId = String(data.ocs.data.id);
|
|
849
866
|
if (typeof data.ocs?.data?.timestamp === "number") timestamp = data.ocs.data.timestamp;
|
|
850
867
|
} catch {}
|
|
@@ -889,7 +906,7 @@ async function sendReactionNextcloudTalk(roomToken, messageId, reaction, opts) {
|
|
|
889
906
|
});
|
|
890
907
|
try {
|
|
891
908
|
if (!response.ok) {
|
|
892
|
-
const errorBody = await response
|
|
909
|
+
const errorBody = await readNextcloudTalkErrorSnippet(response);
|
|
893
910
|
throw new Error(`Nextcloud Talk reaction failed: ${response.status} ${errorBody}`.trim());
|
|
894
911
|
}
|
|
895
912
|
return { ok: true };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as nextcloudTalkPlugin } from "./channel-
|
|
1
|
+
import { t as nextcloudTalkPlugin } from "./channel-C6wFKYpX.js";
|
|
2
2
|
export { nextcloudTalkPlugin };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nextcloud-talk",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.7.1-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/nextcloud-talk",
|
|
9
|
-
"version": "2026.
|
|
9
|
+
"version": "2026.7.1-beta.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"zod": "4.4.3"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"openclaw": ">=2026.
|
|
14
|
+
"openclaw": ">=2026.7.1-beta.1"
|
|
15
15
|
},
|
|
16
16
|
"peerDependenciesMeta": {
|
|
17
17
|
"openclaw": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nextcloud-talk",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.7.1-beta.1",
|
|
4
4
|
"description": "OpenClaw Nextcloud Talk channel plugin for conversations.",
|
|
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.7.1-beta.1"
|
|
12
12
|
},
|
|
13
13
|
"peerDependenciesMeta": {
|
|
14
14
|
"openclaw": {
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"minHostVersion": ">=2026.4.10"
|
|
41
41
|
},
|
|
42
42
|
"compat": {
|
|
43
|
-
"pluginApi": ">=2026.
|
|
43
|
+
"pluginApi": ">=2026.7.1-beta.1"
|
|
44
44
|
},
|
|
45
45
|
"build": {
|
|
46
|
-
"openclawVersion": "2026.
|
|
46
|
+
"openclawVersion": "2026.7.1-beta.1"
|
|
47
47
|
},
|
|
48
48
|
"release": {
|
|
49
49
|
"publishToClawHub": true,
|