@openclaw/nextcloud-talk 2026.2.6 → 2026.2.9
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/package.json +1 -1
- package/src/inbound.ts +16 -8
- package/src/onboarding.ts +7 -2
- package/src/types.ts +2 -0
package/package.json
CHANGED
package/src/inbound.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type RuntimeEnv,
|
|
7
7
|
} from "openclaw/plugin-sdk";
|
|
8
8
|
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
|
|
9
|
-
import type { CoreConfig, NextcloudTalkInboundMessage } from "./types.js";
|
|
9
|
+
import type { CoreConfig, GroupPolicy, NextcloudTalkInboundMessage } from "./types.js";
|
|
10
10
|
import {
|
|
11
11
|
normalizeNextcloudTalkAllowlist,
|
|
12
12
|
resolveNextcloudTalkAllowlistMatch,
|
|
@@ -84,8 +84,12 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
84
84
|
statusSink?.({ lastInboundAt: message.timestamp });
|
|
85
85
|
|
|
86
86
|
const dmPolicy = account.config.dmPolicy ?? "pairing";
|
|
87
|
-
const defaultGroupPolicy = config.channels?.defaults
|
|
88
|
-
|
|
87
|
+
const defaultGroupPolicy = (config.channels as Record<string, unknown> | undefined)?.defaults as
|
|
88
|
+
| { groupPolicy?: string }
|
|
89
|
+
| undefined;
|
|
90
|
+
const groupPolicy = (account.config.groupPolicy ??
|
|
91
|
+
defaultGroupPolicy?.groupPolicy ??
|
|
92
|
+
"allowlist") as GroupPolicy;
|
|
89
93
|
|
|
90
94
|
const configAllowFrom = normalizeNextcloudTalkAllowlist(account.config.allowFrom);
|
|
91
95
|
const configGroupAllowFrom = normalizeNextcloudTalkAllowlist(account.config.groupAllowFrom);
|
|
@@ -118,7 +122,8 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
118
122
|
cfg: config as OpenClawConfig,
|
|
119
123
|
surface: CHANNEL_ID,
|
|
120
124
|
});
|
|
121
|
-
const useAccessGroups =
|
|
125
|
+
const useAccessGroups =
|
|
126
|
+
(config.commands as Record<string, unknown> | undefined)?.useAccessGroups !== false;
|
|
122
127
|
const senderAllowedForCommands = resolveNextcloudTalkAllowlistMatch({
|
|
123
128
|
allowFrom: isGroup ? effectiveGroupAllowFrom : effectiveAllowFrom,
|
|
124
129
|
senderId,
|
|
@@ -228,15 +233,18 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
228
233
|
channel: CHANNEL_ID,
|
|
229
234
|
accountId: account.accountId,
|
|
230
235
|
peer: {
|
|
231
|
-
kind: isGroup ? "group" : "
|
|
236
|
+
kind: isGroup ? "group" : "direct",
|
|
232
237
|
id: isGroup ? roomToken : senderId,
|
|
233
238
|
},
|
|
234
239
|
});
|
|
235
240
|
|
|
236
241
|
const fromLabel = isGroup ? `room:${roomName || roomToken}` : senderName || `user:${senderId}`;
|
|
237
|
-
const storePath = core.channel.session.resolveStorePath(
|
|
238
|
-
|
|
239
|
-
|
|
242
|
+
const storePath = core.channel.session.resolveStorePath(
|
|
243
|
+
(config.session as Record<string, unknown> | undefined)?.store as string | undefined,
|
|
244
|
+
{
|
|
245
|
+
agentId: route.agentId,
|
|
246
|
+
},
|
|
247
|
+
);
|
|
240
248
|
const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(config as OpenClawConfig);
|
|
241
249
|
const previousTimestamp = core.channel.session.readSessionUpdatedAt({
|
|
242
250
|
storePath,
|
package/src/onboarding.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
normalizeAccountId,
|
|
7
7
|
type ChannelOnboardingAdapter,
|
|
8
8
|
type ChannelOnboardingDmPolicy,
|
|
9
|
+
type OpenClawConfig,
|
|
9
10
|
type WizardPrompter,
|
|
10
11
|
} from "openclaw/plugin-sdk";
|
|
11
12
|
import type { CoreConfig, DmPolicy } from "./types.js";
|
|
@@ -159,7 +160,11 @@ const dmPolicy: ChannelOnboardingDmPolicy = {
|
|
|
159
160
|
allowFromKey: "channels.nextcloud-talk.allowFrom",
|
|
160
161
|
getCurrent: (cfg) => cfg.channels?.["nextcloud-talk"]?.dmPolicy ?? "pairing",
|
|
161
162
|
setPolicy: (cfg, policy) => setNextcloudTalkDmPolicy(cfg as CoreConfig, policy as DmPolicy),
|
|
162
|
-
promptAllowFrom: promptNextcloudTalkAllowFromForAccount
|
|
163
|
+
promptAllowFrom: promptNextcloudTalkAllowFromForAccount as (params: {
|
|
164
|
+
cfg: OpenClawConfig;
|
|
165
|
+
prompter: WizardPrompter;
|
|
166
|
+
accountId?: string | undefined;
|
|
167
|
+
}) => Promise<OpenClawConfig>,
|
|
163
168
|
};
|
|
164
169
|
|
|
165
170
|
export const nextcloudTalkOnboardingAdapter: ChannelOnboardingAdapter = {
|
|
@@ -196,7 +201,7 @@ export const nextcloudTalkOnboardingAdapter: ChannelOnboardingAdapter = {
|
|
|
196
201
|
prompter,
|
|
197
202
|
label: "Nextcloud Talk",
|
|
198
203
|
currentId: accountId,
|
|
199
|
-
listAccountIds: listNextcloudTalkAccountIds,
|
|
204
|
+
listAccountIds: listNextcloudTalkAccountIds as (cfg: OpenClawConfig) => string[],
|
|
200
205
|
defaultAccountId,
|
|
201
206
|
});
|
|
202
207
|
}
|