@openclaw/matrix 2026.2.14 → 2026.2.15

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.15
4
+
5
+ ### Changes
6
+
7
+ - Version alignment with core OpenClaw release numbers.
8
+
3
9
  ## 2026.2.14
4
10
 
5
11
  ### Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/matrix",
3
- "version": "2026.2.14",
3
+ "version": "2026.2.15",
4
4
  "description": "OpenClaw Matrix channel plugin",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -3,29 +3,33 @@ import type { CoreConfig } from "./types.js";
3
3
  import { resolveMatrixAccountConfig } from "./matrix/accounts.js";
4
4
  import { resolveMatrixRoomConfig } from "./matrix/monitor/rooms.js";
5
5
 
6
- export function resolveMatrixGroupRequireMention(params: ChannelGroupContext): boolean {
6
+ function stripLeadingPrefixCaseInsensitive(value: string, prefix: string): string {
7
+ return value.toLowerCase().startsWith(prefix.toLowerCase())
8
+ ? value.slice(prefix.length).trim()
9
+ : value;
10
+ }
11
+
12
+ function resolveMatrixRoomConfigForGroup(params: ChannelGroupContext) {
7
13
  const rawGroupId = params.groupId?.trim() ?? "";
8
14
  let roomId = rawGroupId;
9
- const lower = roomId.toLowerCase();
10
- if (lower.startsWith("matrix:")) {
11
- roomId = roomId.slice("matrix:".length).trim();
12
- }
13
- if (roomId.toLowerCase().startsWith("channel:")) {
14
- roomId = roomId.slice("channel:".length).trim();
15
- }
16
- if (roomId.toLowerCase().startsWith("room:")) {
17
- roomId = roomId.slice("room:".length).trim();
18
- }
15
+ roomId = stripLeadingPrefixCaseInsensitive(roomId, "matrix:");
16
+ roomId = stripLeadingPrefixCaseInsensitive(roomId, "channel:");
17
+ roomId = stripLeadingPrefixCaseInsensitive(roomId, "room:");
18
+
19
19
  const groupChannel = params.groupChannel?.trim() ?? "";
20
20
  const aliases = groupChannel ? [groupChannel] : [];
21
21
  const cfg = params.cfg as CoreConfig;
22
22
  const matrixConfig = resolveMatrixAccountConfig({ cfg, accountId: params.accountId });
23
- const resolved = resolveMatrixRoomConfig({
23
+ return resolveMatrixRoomConfig({
24
24
  rooms: matrixConfig.groups ?? matrixConfig.rooms,
25
25
  roomId,
26
26
  aliases,
27
27
  name: groupChannel || undefined,
28
28
  }).config;
29
+ }
30
+
31
+ export function resolveMatrixGroupRequireMention(params: ChannelGroupContext): boolean {
32
+ const resolved = resolveMatrixRoomConfigForGroup(params);
29
33
  if (resolved) {
30
34
  if (resolved.autoReply === true) {
31
35
  return false;
@@ -43,27 +47,6 @@ export function resolveMatrixGroupRequireMention(params: ChannelGroupContext): b
43
47
  export function resolveMatrixGroupToolPolicy(
44
48
  params: ChannelGroupContext,
45
49
  ): GroupToolPolicyConfig | undefined {
46
- const rawGroupId = params.groupId?.trim() ?? "";
47
- let roomId = rawGroupId;
48
- const lower = roomId.toLowerCase();
49
- if (lower.startsWith("matrix:")) {
50
- roomId = roomId.slice("matrix:".length).trim();
51
- }
52
- if (roomId.toLowerCase().startsWith("channel:")) {
53
- roomId = roomId.slice("channel:".length).trim();
54
- }
55
- if (roomId.toLowerCase().startsWith("room:")) {
56
- roomId = roomId.slice("room:".length).trim();
57
- }
58
- const groupChannel = params.groupChannel?.trim() ?? "";
59
- const aliases = groupChannel ? [groupChannel] : [];
60
- const cfg = params.cfg as CoreConfig;
61
- const matrixConfig = resolveMatrixAccountConfig({ cfg, accountId: params.accountId });
62
- const resolved = resolveMatrixRoomConfig({
63
- rooms: matrixConfig.groups ?? matrixConfig.rooms,
64
- roomId,
65
- aliases,
66
- name: groupChannel || undefined,
67
- }).config;
50
+ const resolved = resolveMatrixRoomConfigForGroup(params);
68
51
  return resolved?.tools;
69
52
  }
@@ -1,9 +1,8 @@
1
+ import type { BaseProbeResult } from "openclaw/plugin-sdk";
1
2
  import { createMatrixClient, isBunRuntime } from "./client.js";
2
3
 
3
- export type MatrixProbe = {
4
- ok: boolean;
4
+ export type MatrixProbe = BaseProbeResult & {
5
5
  status?: number | null;
6
- error?: string | null;
7
6
  elapsedMs: number;
8
7
  userId?: string | null;
9
8
  };