@openclaw/nextcloud-talk 2026.2.19 → 2026.2.22
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/channel.ts +9 -2
- package/src/inbound.ts +24 -7
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
deleteAccountFromConfigSection,
|
|
6
6
|
formatPairingApproveHint,
|
|
7
7
|
normalizeAccountId,
|
|
8
|
+
resolveAllowlistProviderRuntimeGroupPolicy,
|
|
9
|
+
resolveDefaultGroupPolicy,
|
|
8
10
|
setAccountEnabledInConfigSection,
|
|
9
11
|
type ChannelPlugin,
|
|
10
12
|
type OpenClawConfig,
|
|
@@ -128,8 +130,13 @@ export const nextcloudTalkPlugin: ChannelPlugin<ResolvedNextcloudTalkAccount> =
|
|
|
128
130
|
};
|
|
129
131
|
},
|
|
130
132
|
collectWarnings: ({ account, cfg }) => {
|
|
131
|
-
const defaultGroupPolicy = cfg
|
|
132
|
-
const
|
|
133
|
+
const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
|
|
134
|
+
const { groupPolicy } = resolveAllowlistProviderRuntimeGroupPolicy({
|
|
135
|
+
providerConfigPresent:
|
|
136
|
+
(cfg.channels as Record<string, unknown> | undefined)?.["nextcloud-talk"] !== undefined,
|
|
137
|
+
groupPolicy: account.config.groupPolicy,
|
|
138
|
+
defaultGroupPolicy,
|
|
139
|
+
});
|
|
133
140
|
if (groupPolicy !== "open") {
|
|
134
141
|
return [];
|
|
135
142
|
}
|
package/src/inbound.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
+
GROUP_POLICY_BLOCKED_LABEL,
|
|
2
3
|
createReplyPrefixOptions,
|
|
3
4
|
logInboundDrop,
|
|
4
5
|
resolveControlCommandGate,
|
|
6
|
+
resolveAllowlistProviderRuntimeGroupPolicy,
|
|
7
|
+
resolveDefaultGroupPolicy,
|
|
8
|
+
warnMissingProviderGroupPolicyFallbackOnce,
|
|
5
9
|
type OpenClawConfig,
|
|
6
10
|
type RuntimeEnv,
|
|
7
11
|
} from "openclaw/plugin-sdk";
|
|
@@ -84,16 +88,29 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
84
88
|
statusSink?.({ lastInboundAt: message.timestamp });
|
|
85
89
|
|
|
86
90
|
const dmPolicy = account.config.dmPolicy ?? "pairing";
|
|
87
|
-
const defaultGroupPolicy = (config
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
const defaultGroupPolicy = resolveDefaultGroupPolicy(config as OpenClawConfig);
|
|
92
|
+
const { groupPolicy, providerMissingFallbackApplied } =
|
|
93
|
+
resolveAllowlistProviderRuntimeGroupPolicy({
|
|
94
|
+
providerConfigPresent:
|
|
95
|
+
((config.channels as Record<string, unknown> | undefined)?.["nextcloud-talk"] ??
|
|
96
|
+
undefined) !== undefined,
|
|
97
|
+
groupPolicy: account.config.groupPolicy as GroupPolicy | undefined,
|
|
98
|
+
defaultGroupPolicy,
|
|
99
|
+
});
|
|
100
|
+
warnMissingProviderGroupPolicyFallbackOnce({
|
|
101
|
+
providerMissingFallbackApplied,
|
|
102
|
+
providerKey: "nextcloud-talk",
|
|
103
|
+
accountId: account.accountId,
|
|
104
|
+
blockedLabel: GROUP_POLICY_BLOCKED_LABEL.room,
|
|
105
|
+
log: (message) => runtime.log?.(message),
|
|
106
|
+
});
|
|
93
107
|
|
|
94
108
|
const configAllowFrom = normalizeNextcloudTalkAllowlist(account.config.allowFrom);
|
|
95
109
|
const configGroupAllowFrom = normalizeNextcloudTalkAllowlist(account.config.groupAllowFrom);
|
|
96
|
-
const storeAllowFrom =
|
|
110
|
+
const storeAllowFrom =
|
|
111
|
+
dmPolicy === "allowlist"
|
|
112
|
+
? []
|
|
113
|
+
: await core.channel.pairing.readAllowFromStore(CHANNEL_ID).catch(() => []);
|
|
97
114
|
const storeAllowList = normalizeNextcloudTalkAllowlist(storeAllowFrom);
|
|
98
115
|
|
|
99
116
|
const roomMatch = resolveNextcloudTalkRoomMatch({
|