@openclaw/nextcloud-talk 2026.6.11 → 2026.6.34
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-Df49F-hj.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";
|
|
@@ -742,6 +742,22 @@ function looksLikeNextcloudTalkTargetId(raw) {
|
|
|
742
742
|
}
|
|
743
743
|
//#endregion
|
|
744
744
|
//#region extensions/nextcloud-talk/src/send.ts
|
|
745
|
+
const NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_BYTES = 8 * 1024;
|
|
746
|
+
const NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_CHARS = 200;
|
|
747
|
+
/** Collapses whitespace and caps an error-body prefix to a short, log-safe snippet. */
|
|
748
|
+
function collapseErrorSnippet(text) {
|
|
749
|
+
const collapsed = text.replace(/\s+/g, " ").trim();
|
|
750
|
+
if (collapsed.length > NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_CHARS) return `${collapsed.slice(0, NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_CHARS)}…`;
|
|
751
|
+
return collapsed;
|
|
752
|
+
}
|
|
753
|
+
/** Reads a bounded, collapsed error-body snippet without buffering hostile responses. */
|
|
754
|
+
async function readNextcloudTalkErrorSnippet(response) {
|
|
755
|
+
try {
|
|
756
|
+
return collapseErrorSnippet(await readResponseTextLimited(response, NEXTCLOUD_TALK_ERROR_SNIPPET_MAX_BYTES));
|
|
757
|
+
} catch {
|
|
758
|
+
return "";
|
|
759
|
+
}
|
|
760
|
+
}
|
|
745
761
|
function resolveCredentials(explicit, account) {
|
|
746
762
|
const baseUrl = explicit.baseUrl?.trim() ?? account.baseUrl;
|
|
747
763
|
const secret = explicit.secret?.trim() ?? account.secret;
|
|
@@ -831,7 +847,7 @@ async function sendMessageNextcloudTalk(to, text, opts) {
|
|
|
831
847
|
});
|
|
832
848
|
try {
|
|
833
849
|
if (!response.ok) {
|
|
834
|
-
const errorBody = await response
|
|
850
|
+
const errorBody = await readNextcloudTalkErrorSnippet(response);
|
|
835
851
|
const status = response.status;
|
|
836
852
|
let errorMsg = `Nextcloud Talk send failed (${status})`;
|
|
837
853
|
if (status === 400) errorMsg = `Nextcloud Talk: bad request - ${errorBody || "invalid message format"}`;
|
|
@@ -844,7 +860,7 @@ async function sendMessageNextcloudTalk(to, text, opts) {
|
|
|
844
860
|
let messageId = "unknown";
|
|
845
861
|
let timestamp;
|
|
846
862
|
try {
|
|
847
|
-
const data = await response
|
|
863
|
+
const data = await readProviderJsonResponse(response, "Nextcloud Talk send");
|
|
848
864
|
if (data.ocs?.data?.id != null) messageId = String(data.ocs.data.id);
|
|
849
865
|
if (typeof data.ocs?.data?.timestamp === "number") timestamp = data.ocs.data.timestamp;
|
|
850
866
|
} catch {}
|
|
@@ -889,7 +905,7 @@ async function sendReactionNextcloudTalk(roomToken, messageId, reaction, opts) {
|
|
|
889
905
|
});
|
|
890
906
|
try {
|
|
891
907
|
if (!response.ok) {
|
|
892
|
-
const errorBody = await response
|
|
908
|
+
const errorBody = await readNextcloudTalkErrorSnippet(response);
|
|
893
909
|
throw new Error(`Nextcloud Talk reaction failed: ${response.status} ${errorBody}`.trim());
|
|
894
910
|
}
|
|
895
911
|
return { ok: true };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as nextcloudTalkPlugin } from "./channel-
|
|
1
|
+
import { t as nextcloudTalkPlugin } from "./channel-Df49F-hj.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.6.
|
|
3
|
+
"version": "2026.6.34",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/nextcloud-talk",
|
|
9
|
-
"version": "2026.6.
|
|
9
|
+
"version": "2026.6.34",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"zod": "4.4.3"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"openclaw": ">=2026.6.
|
|
14
|
+
"openclaw": ">=2026.6.34"
|
|
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.6.
|
|
3
|
+
"version": "2026.6.34",
|
|
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.6.
|
|
11
|
+
"openclaw": ">=2026.6.34"
|
|
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.6.
|
|
43
|
+
"pluginApi": ">=2026.6.34"
|
|
44
44
|
},
|
|
45
45
|
"build": {
|
|
46
|
-
"openclawVersion": "2026.6.
|
|
46
|
+
"openclawVersion": "2026.6.34"
|
|
47
47
|
},
|
|
48
48
|
"release": {
|
|
49
49
|
"publishToClawHub": true,
|