@openclaw/matrix 2026.2.21 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.2.22
4
+
5
+ ### Changes
6
+
7
+ - Version alignment with core OpenClaw release numbers.
8
+
3
9
  ## 2026.1.14
4
10
 
5
11
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.2.21",
3
+ "version": "2026.2.22",
4
4
  "description": "OpenClaw Matrix channel plugin",
5
5
  "type": "module",
6
6
  "dependencies": {
package/src/channel.ts CHANGED
@@ -6,6 +6,8 @@ import {
6
6
  formatPairingApproveHint,
7
7
  normalizeAccountId,
8
8
  PAIRING_APPROVED_MESSAGE,
9
+ resolveAllowlistProviderRuntimeGroupPolicy,
10
+ resolveDefaultGroupPolicy,
9
11
  setAccountEnabledInConfigSection,
10
12
  type ChannelPlugin,
11
13
  } from "openclaw/plugin-sdk";
@@ -169,8 +171,12 @@ export const matrixPlugin: ChannelPlugin<ResolvedMatrixAccount> = {
169
171
  };
170
172
  },
171
173
  collectWarnings: ({ account, cfg }) => {
172
- const defaultGroupPolicy = (cfg as CoreConfig).channels?.defaults?.groupPolicy;
173
- const groupPolicy = account.config.groupPolicy ?? defaultGroupPolicy ?? "allowlist";
174
+ const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg as CoreConfig);
175
+ const { groupPolicy } = resolveAllowlistProviderRuntimeGroupPolicy({
176
+ providerConfigPresent: (cfg as CoreConfig).channels?.matrix !== undefined,
177
+ groupPolicy: account.config.groupPolicy,
178
+ defaultGroupPolicy,
179
+ });
174
180
  if (groupPolicy !== "open") {
175
181
  return [];
176
182
  }
@@ -218,9 +218,10 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam
218
218
  }
219
219
 
220
220
  const senderName = await getMemberDisplayName(roomId, senderId);
221
- const storeAllowFrom = await core.channel.pairing
222
- .readAllowFromStore("matrix")
223
- .catch(() => []);
221
+ const storeAllowFrom =
222
+ dmPolicy === "allowlist"
223
+ ? []
224
+ : await core.channel.pairing.readAllowFromStore("matrix").catch(() => []);
224
225
  const effectiveAllowFrom = normalizeMatrixAllowList([...allowFrom, ...storeAllowFrom]);
225
226
  const groupAllowFrom = cfg.channels?.matrix?.groupAllowFrom ?? [];
226
227
  const effectiveGroupAllowFrom = normalizeMatrixAllowList(groupAllowFrom);
@@ -1,5 +1,13 @@
1
1
  import { format } from "node:util";
2
- import { mergeAllowlist, summarizeMapping, type RuntimeEnv } from "openclaw/plugin-sdk";
2
+ import {
3
+ GROUP_POLICY_BLOCKED_LABEL,
4
+ mergeAllowlist,
5
+ resolveAllowlistProviderRuntimeGroupPolicy,
6
+ resolveDefaultGroupPolicy,
7
+ summarizeMapping,
8
+ warnMissingProviderGroupPolicyFallbackOnce,
9
+ type RuntimeEnv,
10
+ } from "openclaw/plugin-sdk";
3
11
  import { resolveMatrixTargets } from "../../resolve-targets.js";
4
12
  import { getMatrixRuntime } from "../../runtime.js";
5
13
  import type { CoreConfig, ReplyToMode } from "../../types.js";
@@ -242,8 +250,20 @@ export async function monitorMatrixProvider(opts: MonitorMatrixOpts = {}): Promi
242
250
  setActiveMatrixClient(client, opts.accountId);
243
251
 
244
252
  const mentionRegexes = core.channel.mentions.buildMentionRegexes(cfg);
245
- const defaultGroupPolicy = cfg.channels?.defaults?.groupPolicy;
246
- const groupPolicyRaw = accountConfig.groupPolicy ?? defaultGroupPolicy ?? "allowlist";
253
+ const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
254
+ const { groupPolicy: groupPolicyRaw, providerMissingFallbackApplied } =
255
+ resolveAllowlistProviderRuntimeGroupPolicy({
256
+ providerConfigPresent: cfg.channels?.matrix !== undefined,
257
+ groupPolicy: accountConfig.groupPolicy,
258
+ defaultGroupPolicy,
259
+ });
260
+ warnMissingProviderGroupPolicyFallbackOnce({
261
+ providerMissingFallbackApplied,
262
+ providerKey: "matrix",
263
+ accountId: account.accountId,
264
+ blockedLabel: GROUP_POLICY_BLOCKED_LABEL.room,
265
+ log: (message) => logVerboseMessage(message),
266
+ });
247
267
  const groupPolicy = allowlistOnly && groupPolicyRaw === "open" ? "allowlist" : groupPolicyRaw;
248
268
  const replyToMode = opts.replyToMode ?? accountConfig.replyToMode ?? "off";
249
269
  const threadReplies = accountConfig.threadReplies ?? "inbound";