Skip to content

This document was written by AI and has been manually reviewed.

Drivers Overview ​

A driver is the adapter between NextBridge and a specific chat platform. Each driver handles receiving messages from its platform and sending messages to it.

Supported platforms ​

PlatformDriverReceiveSendNotes
Tencent QQNapCat✅✅Uses the unofficial NapCat WebSocket bridge
DiscordDiscord✅✅Receive via bot gateway; send via webhook or bot
TelegramTelegram✅✅Uses long polling
Feishu / LarkFeishu✅✅Webhook receive; IM API send
DingTalkDingTalk✅✅Webhook receive; Robot API send
Yunhu (云湖)Yunhu✅✅Webhook receive; open API send
KOOK (开黑啦)KOOK✅✅WebSocket receive; bot API send; uploads to KOOK CDN
VoceChatVoceChat✅✅
MatrixMatrix✅✅Client sync loop; E2E encryption supported when enable_e2e is enabled
SignalSignal✅✅Requires signal-cli REST API
Microsoft TeamsTeams✅✅Bot Framework connector
Google ChatGoogle Chat✅✅REST API with service account
SlackSlack✅✅Socket Mode or Events API receive; bot or webhook send
MattermostMattermost✅✅WebSocket receive; REST API send
Rocket.ChatRocket.Chat✅✅Outgoing webhook receive; REST API or incoming webhook send
WebhookWebhook❌✅Send-only generic HTTP webhook
WhatsAppWhatsApp✅✅Uses neonize (go-whatsapp bindings); no Node.js required

How drivers work ​

Every driver:

  1. Registers a sender with the bridge on startup so the bridge can call it to deliver messages.
  2. Listens for incoming messages (WebSocket, long-polling, or HTTP webhook).
  3. Normalizes each incoming message into a NormalizedMessage and passes it to the bridge.
  4. Sends formatted text and attachments when the bridge calls its sender.

Media handling ​

All drivers share a common media-download utility. When a message with attachments arrives, the bridge passes the attachment list to the target driver's send() method. Each driver downloads the file (up to max_file_size bytes) and re-uploads it using the target platform's native API.

If a file exceeds the size limit or the download fails, a text fallback is appended to the message:

[Image: photo.jpg](https://example.com/photo.jpg)