Skip to content

feat(channels): add Mattermost channel and harden gateway integration#1586

Open
2niuhe wants to merge 2 commits intosipeed:mainfrom
2niuhe:mattermost
Open

feat(channels): add Mattermost channel and harden gateway integration#1586
2niuhe wants to merge 2 commits intosipeed:mainfrom
2niuhe:mattermost

Conversation

@2niuhe
Copy link

@2niuhe 2niuhe commented Mar 15, 2026

📝 Description

This PR adds Mattermost channel support and hardens runtime stability for long-running gateway
sessions.

Included changes

  • register Mattermost channel factory and wire it into gateway startup
  • add channels.mattermost initialization path with required URL/token checks
  • implement Mattermost channel runtime (websocket consume, send/edit/typing/media)
  • add websocket ping/pong keepalive with reconnect backoff reset after successful connect
  • add manager init regression tests for Mattermost enabled/invalid configs
  • extend config schema/env mappings and required module dependencies

Why

  • Fixes gateway startup failure when Mattermost is configured but channel init path was missing.
  • Improves recovery from half-open websocket connections that could cause silent non-response after
    multi-turn chats.
  • Prevents silent media-send failures by checking post status codes explicitly.

🗣️ 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: x86_64 PC
  • OS: Linux (local dev environment)
  • Model/Provider: Local existing provider configuration (unchanged by this PR)
  • Channels: Mattermost

📸 Evidence (Optional)

Details image

make check passed

☑️ 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

CLAassistant commented Mar 15, 2026

CLA assistant check
All committers have signed the CLA.

@sipeed-bot sipeed-bot bot added type: enhancement New feature or request domain: channel domain: config go Pull requests that update go code dependencies Pull requests that update a dependency file labels Mar 15, 2026
2niuhe added 2 commits March 18, 2026 13:36
- register Mattermost channel factory and wire it into gateway startup

- add channels.mattermost initialization path with required URL/token checks

- implement Mattermost channel runtime (websocket consume, send/edit/typing/media)

- add websocket ping/pong keepalive with reconnect backoff reset after successful connect

- add manager init regression tests for Mattermost enabled/invalid configs

- extend config schema/env mappings and required module dependencies
- add Mattermost channel guide under docs/channels

- update README chat app section with Mattermost quick start

- update README.zh channel matrix with Mattermost entry

- add channels.mattermost template in config/config.example.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file domain: channel domain: config go Pull requests that update go code type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants