Skip to content

feat: add Matrix channel support#1220

Merged
alexhoshina merged 5 commits intosipeed:mainfrom
horsley:feat/matrix-channel-support
Mar 8, 2026
Merged

feat: add Matrix channel support#1220
alexhoshina merged 5 commits intosipeed:mainfrom
horsley:feat/matrix-channel-support

Conversation

@horsley
Copy link
Copy Markdown
Contributor

@horsley horsley commented Mar 7, 2026

📝 Description

This PR adds first-class Matrix channel support to PicoClaw, including gateway integration, config/defaults, tests, launcher UI updates, and both Chinese/English documentation.

It also fixes a migration bug where OpenClaw channels.matrix.enabled could be ignored and incorrectly forced to true during migration.

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

📚 Technical Context (Skip for Docs)

🧪 Test Environment

  • Hardware: PC (x86_64)
  • OS: Ubuntu (container/dev environment)
  • Model/Provider: N/A for this change (channel + config + migration + docs)
  • Channels: Matrix

📸 Evidence (Optional)

Click to view Logs/Screenshots

go test ./... passed locally.

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 7, 2026

CLA assistant check
All committers have signed the CLA.

@horsley
Copy link
Copy Markdown
Contributor Author

horsley commented Mar 7, 2026

Follow-up comparison with #356 for reviewer context:

Compared with #356, this PR additionally aligns Matrix support with the current PicoClaw architecture and contributor workflow:

  1. Current channel structure + tests
    • Uses pkg/channels/matrix/ (init.go + matrix.go + matrix_test.go) instead of a single legacy file.
  2. Broader product integration
    • Adds launcher UI support (TUI + Web), gateway helper wiring, config defaults/tests, and README/README.zh updates.
  3. OpenClaw migration support (with bug fix)
    • Includes Matrix migration mapping and preserves channels.matrix.enabled=false correctly during migration.
  4. Media path aligned to unified pipeline
    • Covers inbound/outbound media in channel behavior, with MediaStore-based handling/fallback and encrypted attachment decryption support.
  5. Bilingual channel docs
    • Adds both docs/channels/matrix/README.md and docs/channels/matrix/README.zh.md.
  6. Cleaner scope for mergeability
    • Avoids coupling Matrix channel introduction with unrelated voice/TTS/transcriber/message-tool changes.

So this PR is intended as a more merge-ready Matrix integration pass for the current codebase.

@horsley
Copy link
Copy Markdown
Contributor Author

horsley commented Mar 7, 2026

Follow-up fix pushed in commit 64b99b3:

  • Matrix group mention detection now also recognizes matrix.to anchor mentions from formatted_body, including URL-encoded forms such as %40user%3Aserver.
  • Added a dedicated debug log when a group message is filtered by trigger rules: Ignoring group message by trigger rules.

This should help diagnose the "@mention in group has no response" behavior more clearly.

Comment thread pkg/channels/matrix/matrix.go Outdated
Comment thread pkg/channels/matrix/matrix.go
@alexhoshina alexhoshina merged commit b767ca9 into sipeed:main Mar 8, 2026
4 checks passed
dj-oyu pushed a commit to dj-oyu/picoclaw that referenced this pull request Mar 8, 2026
@Orgmar
Copy link
Copy Markdown
Contributor

Orgmar commented Mar 9, 2026

@horsley Matrix channel support with gateway integration, config defaults, tests, launcher UI, and bilingual docs all in one PR, that's a thorough contribution. Also good catch fixing the migration bug where channels.matrix.enabled could get forced to true incorrectly.

We have a PicoClaw Dev Group on Discord where contributors collaborate. If you're interested in joining, send an email to support@sipeed.com with the subject [Join PicoClaw Dev Group] horsley and we'll send you the invite!

fishtrees pushed a commit to fishtrees/picoclaw that referenced this pull request Mar 12, 2026
@horsley horsley deleted the feat/matrix-channel-support branch March 12, 2026 11:13
dj-oyu pushed a commit to dj-oyu/picoclaw that referenced this pull request Mar 14, 2026
andressg79 pushed a commit to andressg79/picoclaw that referenced this pull request Mar 30, 2026
ra1phdd pushed a commit to ra1phdd/picoclaw-pkg that referenced this pull request Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants