Merged
Size
S
Change Breakdown
Bug Fix80%
Testing20%
#58271fix(mattermost): add groups property to config schema (#57618)

Mattermost config validation restored

Existing Mattermost configurations with group settings now pass strict validation again after a regression in v2026.3.28 rejected the previously-accepted property.

After upgrading to v2026.3.28, OpenClaw users with Mattermost channel configurations hit a wall: their working configs suddenly failed validation with "must NOT have additional properties" errors. The culprit was a schema strictness change — the Mattermost config schema uses .strict() to reject unknown fields, but the groups property was never declared in the schema despite being actively used by the runtime code.

This fix adds the missing groups property declaration to the Mattermost account schema. The property now accepts per-group settings with an optional requireMention flag, matching how other channel plugins like IRC, Matrix, and Feishu handle group configurations.

Mattermost users on v2026.3.28 can upgrade and their existing configurations will validate correctly again.

View Original GitHub DescriptionFact Check

Summary

Fixes #57618 — Mattermost channel config validation rejects groups property with "must NOT have additional properties" after upgrading to v2026.3.28.

Root Cause

The Mattermost config schema (MattermostAccountSchemaBase) uses .strict() to reject unknown properties, but the groups property was never declared in the schema despite being used in runtime code (monitor.ts, monitor.test.ts). Other channel plugins (IRC, Matrix, Feishu, BlueBubbles, Zalo, LINE) all include groups in their schemas.

Changes

  • extensions/mattermost/src/config-schema-core.ts: Add MattermostGroupSchema (with requireMention, enabled, allowFrom fields) and groups record to MattermostAccountSchemaBase
  • extensions/mattermost/src/config-schema.ts: Same schema addition (test-facing schema)
  • extensions/mattermost/src/config-schema.test.ts: Add 3 test cases for groups acceptance/rejection

Test

pnpm test -- extensions/mattermost/src/config-schema.test.ts
# 8 tests passed (8)

Closes #57618

© 2026 · via Gitpulse