Which Messaging Platforms Does WeKnora Integrate With? Complete Platform Support Guide
WeKnora integrates with ten messaging platforms: WeCom, Feishu, Lark, Slack, Telegram, DingTalk, Mattermost, WeChat, QQBot, and Yunzhijia, each mapped to specific adapter factories and channel constants in the Tencent open-source codebase.
WeKnora is an open-source knowledge management system developed by Tencent that unifies enterprise messaging through a modular IM adapter architecture. Understanding which messaging platforms WeKnora integrates with is essential for configuring knowledge ingestion pipelines, routing incoming messages, and mapping communication channels. The platform implements a factory-based adapter pattern that supports ten distinct messaging services through standardized identifiers defined in the core Go source code.
Complete List of Supported Messaging Platforms
WeKnora provides native integration for ten instant messaging platforms, each assigned a unique string identifier used throughout the routing and validation logic. The supported platforms and their corresponding code constants are:
| Platform | Identifier | Notes |
|---|---|---|
| WeCom (企业微信) | wecom |
Enterprise WeChat |
| Feishu (飞书) | feishu |
ByteDance enterprise platform |
| Lark | lark |
International Feishu edition |
| Slack | slack |
Enterprise collaboration |
| Telegram | telegram |
Cloud-based messaging |
| DingTalk | dingtalk |
Alibaba enterprise platform |
| Mattermost | mattermost |
Open-source Slack alternative |
wechat |
Personal WeChat accounts | |
| QQBot | qqbot |
Tencent QQ bot interface |
| Yunzhijia | yunzhijia |
Kingdee enterprise platform |
These identifiers are not merely configuration strings; they are strongly typed constants used to instantiate specific adapter implementations and validate incoming API requests.
Core Platform Constants Definition
The canonical list of supported platforms is defined as typed constants in internal/im/adapter.go. This file declares the Platform type and enumerates all supported services:
// Platform identifiers
type Platform string
const (
PlatformWeCom Platform = "wecom"
PlatformFeishu Platform = "feishu"
PlatformLark Platform = "lark"
PlatformSlack Platform = "slack"
PlatformTelegram Platform = "telegram"
PlatformDingtalk Platform = "dingtalk"
PlatformMattermost Platform = "mattermost"
PlatformWeChat Platform = "wechat"
PlatformQQBot Platform = "qqbot"
PlatformYunzhijia Platform = "yunzhijia"
)
These constants serve as the single source of truth for platform identification. When the system determines which adapter to instantiate for message processing, it references these typed identifiers to ensure type safety and prevent runtime errors from string typos.
Knowledge Ingestion Channel Mapping
Beyond routing messages, WeKnora tracks the origin platform of ingested knowledge using mirrored channel constants. These are defined in internal/types/knowledge.go and map directly to the adapter platform identifiers:
const (
ChannelWecom = "wecom"
ChannelFeishu = "feishu"
ChannelLark = "lark"
ChannelSlack = "slack"
ChannelTelegram = "telegram"
ChannelDingtalk = "dingtalk"
ChannelMattermost = "mattermost"
ChannelWechat = "wechat"
ChannelQQBot = "qqbot"
ChannelYunzhijia = "yunzhijia"
)
When knowledge records are created, the system tags them with the appropriate channel constant to maintain provenance metadata. For example, when processing a Slack message:
knowledge := types.Knowledge{
ID: uuid.NewString(),
Content: content,
Channel: types.ChannelSlack,
OwnerID: userID,
}
repo.SaveKnowledge(ctx, knowledge)
Runtime Registration of Adapter Factories
Each messaging platform requires a specific adapter implementation to handle authentication, message formatting, and API communication. These adapters are registered at application startup in internal/container/container.go through the initIMService() function:
func initIMService() {
imService := im.NewService()
// Register factories for each supported platform
imService.RegisterAdapterFactory("wecom", wecom.NewFactory())
imService.RegisterAdapterFactory("feishu", feishu.NewFactory())
imService.RegisterAdapterFactory("lark", feishu.NewFactory()) // Lark uses Feishu factory
imService.RegisterAdapterFactory("slack", slack.NewFactory())
imService.RegisterAdapterFactory("telegram", telegram.NewFactory())
imService.RegisterAdapterFactory("dingtalk", dingtalk.NewFactory())
imService.RegisterAdapterFactory("mattermost", mattermost.NewFactory())
imService.RegisterAdapterFactory("wechat", wechat.NewFactory())
imService.RegisterAdapterFactory("qqbot", qqbot.NewFactory())
imService.RegisterAdapterFactory("yunzhijia", yunzhijia.NewFactory())
}
Notice that Lark reuses the Feishu adapter factory (feishu.NewFactory()), as Lark is the international edition of Feishu and shares the same underlying API structure. The imService stores these factories in a registry map, keyed by the platform identifier strings.
Request Validation and Platform Routing
When the HTTP API receives requests to send messages or process webhooks, it validates the platform parameter against the supported list. This logic appears in internal/handler/im.go:
func (h *IMHandler) SendMessage(c *gin.Context) {
platform := c.Query("platform")
if !im.IsSupportedPlatform(platform) {
c.JSON(http.StatusBadRequest, gin.H{"error": "unsupported platform"})
return
}
// Dispatch to the appropriate adapter via imService
adapter, err := h.imService.GetAdapter(platform)
// ... handle message dispatch
}
The IsSupportedPlatform() function checks the input against the known platform constants, ensuring only configured adapters handle requests. Once validated, the imService retrieves the appropriate factory from its registry and creates a platform-specific adapter instance.
Platform-Specific Adapter Implementations
Each supported platform has a dedicated subdirectory under internal/im/ containing its adapter implementation:
internal/im/slack/adapter.go- Slack API integrationinternal/im/wechat/adapter.go- Personal WeChat bot protocolsinternal/im/wecom/adapter.go- WeCom enterprise webhooksinternal/im/telegram/adapter.go- Telegram Bot APIinternal/im/dingtalk/adapter.go- DingTalk webhook and bot APIsinternal/im/mattermost/adapter.go- Mattermost API bindingsinternal/im/qqbot/adapter.go- QQ Bot framework integrationinternal/im/yunzhijia/adapter.go- Yunzhijia enterprise connectorsinternal/im/feishu/adapter.go- Feishu/Lark combined adapter
These adapters implement a common interface defined in the core IM service, ensuring consistent behavior for message sending, receiving, and knowledge extraction across all ten platforms.
Summary
- WeKnora supports ten messaging platforms: WeCom, Feishu, Lark, Slack, Telegram, DingTalk, Mattermost, WeChat, QQBot, and Yunzhijia.
- Platform identifiers are strongly typed constants defined in
internal/im/adapter.goand mirrored as channel constants ininternal/types/knowledge.go. - Adapter factories for each platform are registered at runtime in
internal/container/container.go, with Lark sharing Feishu's factory implementation. - Request validation occurs in
internal/handler/im.go, ensuring only supported platforms process incoming messages through theIsSupportedPlatform()check. - Individual adapters reside in
internal/im/[platform]/adapter.go, handling platform-specific API protocols while exposing a unified interface to the core service.
Frequently Asked Questions
Does WeKnora support both Feishu and Lark simultaneously?
Yes. WeKnora treats Feishu and Lark as distinct platforms (feishu and lark identifiers), but both utilize the same adapter factory registered in internal/container/container.go. You can configure both platforms independently within the same WeKnora instance, with Lark routing through feishu.NewFactory() while maintaining separate channel tags for knowledge provenance tracking.
How does WeKnora handle unsupported messaging platforms?
The system validates platform parameters using im.IsSupportedPlatform() before instantiating any adapters. If a request specifies an unsupported platform identifier, the HTTP handler in internal/handler/im.go returns an immediate 400 Bad Request response with an "unsupported platform" error message, preventing undefined behavior or nil pointer dereferences.
Where are the platform identifiers defined in the source code?
Platform identifiers are defined as typed constants in internal/im/adapter.go using the Platform string type. Additionally, knowledge ingestion channels use identical string constants in internal/types/knowledge.go. Both files must be updated when adding new platform support to maintain consistency across the routing and storage layers.
Can I add custom messaging platforms to WeKnora?
Yes, the architecture supports extension by implementing the adapter interface and registering a new factory. You must: (1) add a new constant to internal/im/adapter.go, (2) create an adapter implementation in internal/im/[platform]/adapter.go, (3) register the factory in internal/container/container.go, and (4) add the corresponding channel constant to internal/types/knowledge.go if knowledge ingestion is required.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →