Skip to content

Commit 56c4fe0

Browse files
author
Benjamin Badejo
committed
fix(config): accept matrix queue overrides
1 parent f7719ae commit 56c4fe0

5 files changed

Lines changed: 71 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Docs: https://docs.openclaw.ai
88

99
### Fixes
1010

11+
- Matrix/config: accept `messages.queue.byChannel.matrix` queue overrides and keep queue provider schema/type keys aligned for Matrix, Google Chat, and Mattermost. Thanks @bdjben.
1112
- Feishu: auto-thread `message(action="send")` replies inside the topic when the active session is group_topic or group_topic_sender, and propagate `replyInThread` through text, card, and media outbound adapters so topic-scoped sessions no longer post at the group root. Fixes #74903. (#77151) Thanks @ai-hpc.
1213

1314
## 2026.5.9

src/config/config.schema-regressions.test.ts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,65 @@ describe("config schema regressions", () => {
171171

172172
expect(res.ok).toBe(true);
173173
});
174+
175+
it("accepts Matrix queue byChannel overrides", () => {
176+
const res = validateConfigObject({
177+
messages: {
178+
queue: {
179+
byChannel: {
180+
matrix: "steer",
181+
},
182+
},
183+
},
184+
});
185+
186+
expect(res.ok).toBe(true);
187+
});
188+
189+
it("accepts Matrix interrupt queue byChannel overrides", () => {
190+
const res = validateConfigObject({
191+
messages: {
192+
queue: {
193+
byChannel: {
194+
matrix: "interrupt",
195+
},
196+
},
197+
},
198+
});
199+
200+
expect(res.ok).toBe(true);
201+
});
202+
203+
it("keeps queue byChannel schema and config type providers aligned", () => {
204+
const res = validateConfigObject({
205+
messages: {
206+
queue: {
207+
byChannel: {
208+
googlechat: "queue",
209+
mattermost: "queue",
210+
matrix: "queue",
211+
},
212+
},
213+
},
214+
});
215+
216+
expect(res.ok).toBe(true);
217+
});
218+
219+
it("rejects unknown queue byChannel providers", () => {
220+
const res = validateConfigObject({
221+
messages: {
222+
queue: {
223+
byChannel: {
224+
unknown: "queue",
225+
},
226+
},
227+
},
228+
});
229+
230+
expect(res.ok).toBe(false);
231+
});
232+
174233
it("accepts string values for agents defaults model inputs", () => {
175234
const res = validateConfigObject({
176235
agents: {

src/config/schema.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,13 @@ describe("config schema", () => {
500500
expect(schema?.properties).toBeUndefined();
501501
});
502502

503+
it("lists Matrix in messages.queue.byChannel schema lookup", () => {
504+
const lookup = lookupConfigSchema(baseSchema, "messages.queue.byChannel");
505+
expect(lookup?.path).toBe("messages.queue.byChannel");
506+
expect(lookup?.children.map((child) => child.key)).toEqual(expect.arrayContaining(["matrix"]));
507+
expect(lookup?.schema).toMatchObject({ additionalProperties: false });
508+
});
509+
503510
it("returns a shallow lookup schema without nested composition keywords", () => {
504511
const lookup = lookupConfigSchema(baseSchema, "agents.list.0.runtime");
505512
expect(lookup?.path).toBe("agents.list.0.runtime");

src/config/types.queue.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ export type QueueModeByProvider = {
1515
irc?: QueueMode;
1616
googlechat?: QueueMode;
1717
slack?: QueueMode;
18+
mattermost?: QueueMode;
1819
signal?: QueueMode;
1920
imessage?: QueueMode;
2021
msteams?: QueueMode;
2122
webchat?: QueueMode;
23+
matrix?: QueueMode;
2224
};

src/config/zod-schema.core.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,12 +727,14 @@ const QueueModeBySurfaceSchema = z
727727
telegram: QueueModeSchema.optional(),
728728
discord: QueueModeSchema.optional(),
729729
irc: QueueModeSchema.optional(),
730+
googlechat: QueueModeSchema.optional(),
730731
slack: QueueModeSchema.optional(),
731732
mattermost: QueueModeSchema.optional(),
732733
signal: QueueModeSchema.optional(),
733734
imessage: QueueModeSchema.optional(),
734735
msteams: QueueModeSchema.optional(),
735736
webchat: QueueModeSchema.optional(),
737+
matrix: QueueModeSchema.optional(),
736738
})
737739
.strict()
738740
.optional();

0 commit comments

Comments
 (0)