Skip to content
rosch100Public

About

Matrix bridge for Infomaniak kChat (bridgev2, derived from aiku/mautrix-mattermost)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

matrix-kchat

CI License: MPL 2.0

A Matrix bridge for Infomaniak kChat, built on the mautrix bridgev2 framework.

Derived from aiku/mautrix-mattermost (MPL-2.0) — kChat speaks the Mattermost v4 REST/WebSocket API, so the connector reuses the official Mattermost Go SDK client.

Features

  • Bidirectional messaging: text, images, videos, audio, files
  • Reactions, edits, deletes (redactions), replies/threads
  • Typing indicators (kChat → Matrix via realtime socket)
  • Read receipts (kChat → Matrix via last_viewed_at polling; kChat has no mark-read API, so receipts are one-way)
  • Rich formatting: Matrix HTML ↔ kChat markdown
  • Direct messages and channel portals; start DMs from Beeper via the pm <kChat-username> command or the provisioning API
  • Message transport: per-5 s channel post polling (kChat's server-side broadcast does not reach third-party sockets) plus realtime socket for typing/presence
  • Message backfill on first sync
  • Login via kChat personal access token (created in the Infomaniak Manager with the kChat scope; kChat has no password login route)
  • bridgev2 native: appservice websockets, E2EE support, double puppeting

Requirements

  • Release binaries are provided for Linux (amd64/arm64, Docker-based CI). macOS/Windows users build from source: Go 1.25+ plus libolm for E2EE.
  • A kChat access token: create one in the Infomaniak Manager or via your kChat account settings

Docker

A prebuilt Linux image (amd64/arm64) is published on GHCR with each release:

docker run -d --name matrix-kchat \
  -v ./data:/data \
  ghcr.io/rosch100/kchat:0.1

On first start the container writes config.yaml to /data; edit it, then restart the container. See the configuration section below.

Team deployment (shared, person-independent)

For serving a whole kChat workspace from ONE bridge instance, deploy a second instance with a dedicated kChat bot account:

  1. Create a kChat bot account (New → Integrations → Bot accounts) and add it to the public channels it should bridge (new public channels are auto-joined on the channel_created event).

  2. Generate a new Beeper bridge registration (bbctl config --type bridgev2 sh-myteam) and set in the network section:

    split_portals: false          # shared rooms, one room per kChat channel
    relay_invite_users:
      - "@colleague:beeper.com"   # automatically invited into every portal
    admin_api_addr: ""            # disable the admin API

    And in the top-level bridge: section, allow relay mode (the connector sets itself as relay user on every portal automatically):

    bridge:
      relay:
        enabled: true
  3. Everyone in relay_invite_users sees every bridged channel; their messages are relayed into kChat through the bot account (relay attribution).

  4. Colleagues keep their own kChat identity only with their own bridge instance (see docs/team-onboarding.md).

Team onboarding

Team members of a kChat workspace: see the German step-by-step guide in docs/team-onboarding.md for setting up your own bridge instance on the shared server.

Setup with Beeper (bridge-manager)

  1. Clone this repository and build and install bbctl:

    git clone https://github.com/beeper/bridge-manager.git
    cd bridge-manager && ./build.sh
  2. Generate the Beeper-flavoured config (network section comes from this bridge):

    bbctl config --type bridgev2 sh-kchat > config.yaml
  3. Fill in the network section (server_url etc. — see config.yaml.example) and start the bridge:

    ./matrix-kchat -c config.yaml

Setup with a self-hosted Matrix server

make build
./matrix-kchat -e -c config.yaml     # generate example config, edit it
./matrix-kchat -g -c config.yaml -r registration.yaml
# Register registration.yaml with your homeserver (app_service_config_files in Synapse)
./matrix-kchat -c config.yaml

Login

  1. Start a chat with the bridge bot (@matrix-kchatbot:your.server or @sh-kchatbot:beeper.local).
  2. Send login, then enter your kChat server URL (https://your-team.kchat.infomaniak.com) and a personal access token (kChat has no password login route; tokens are created in kChat under Account Settings -> Security -> Personal Access Tokens).

kChat specifics

  • The API base URL is always https://<team>.kchat.infomaniak.com/api/v4 (Mattermost-compatible).
  • kChat API rate limit: 60 requests/minute — the bridge batches syncs accordingly.
  • Bots/bridges need read_channel/create_post permissions on the channels they bridge.

License

MPL-2.0. This project is a derivative of aiku/mautrix-mattermost by Remi Philippe; see THIRD_PARTY_NOTICES.

About

Matrix bridge for Infomaniak kChat (bridgev2, derived from aiku/mautrix-mattermost)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages