A Matrix <-> DingTalk bridge written in Rust.
Maintainer: Palpo Team
Usable baseline implemented. Core bidirectional text bridge, admin provisioning API, and dead-letter replay/cleanup are now available.
- Matrix Appservice transaction handling
- Matrix -> DingTalk text forwarding (by persisted room mapping)
- Matrix reply/edit/redaction handling (with policy switches)
- Matrix bot auto-join on invite (
m.room.memberinvite) - DingTalk callback -> Matrix text forwarding
- Per-conversation DingTalk webhook routing (token or full webhook URL)
- Dedup via
processed_events - Message mapping persistence via
message_mappings - Dead-letter recording, listing, replay, and cleanup
- Admin API:
status,mappings,bridge,unbridge,dead-letters/* - CLI management commands:
status,mappings,replay,dead-letter-cleanup
- DingTalk has two common robot modes:
- Group custom webhook robot: outbound webhook send.
- Enterprise app chatbot: callback/event + session webhook.
- This project supports webhook-based outbound and callback-based inbound text flow.
- Copy config:
cp config/config.example.yaml config.yaml- Edit at least:
bridge.domainbridge.homeserver_urldatabase.uri(ordatabase.url)registration.id(orregistration.bridge_id)registration.as_token(orregistration.appservice_token)registration.hs_token(orregistration.homeserver_token)
- Optional env overrides:
DINGTALK_WEBHOOK_URLDINGTALK_ACCESS_TOKENDINGTALK_SECRETDINGTALK_CALLBACK_TOKENMATRIX_BRIDGE_DINGTALK_PROVISIONING_*_TOKEN
- Run:
cargo run --releaseBase URL: http://<bind_address>:<port>/admin
GET /statusGET /mappings?limit=100&offset=0POST /bridgePOST /unbridgeGET /dead-letters?status=pending&limit=100POST /dead-letters/<id>/replayPOST /dead-letters/replayPOST /dead-letters/cleanup
- Focuses on text path first.
- Rich media/event types are not fully bridged yet.
- Callback security currently validates token only (no AES decrypt path yet).
Apache-2.0