Skip to content

feat(channels): add personal WeChat channel support#786

Open
xinuxZ wants to merge 4 commits intoRightNow-AI:mainfrom
xinuxZ:feature/personal-wechat
Open

feat(channels): add personal WeChat channel support#786
xinuxZ wants to merge 4 commits intoRightNow-AI:mainfrom
xinuxZ:feature/personal-wechat

Conversation

@xinuxZ
Copy link

@xinuxZ xinuxZ commented Mar 22, 2026

Summary

This PR adds a new wechat channel for personal WeChat accounts in OpenFang.

Unlike wecom, which targets WeCom / enterprise messaging, this channel is designed for personal WeChat usage.

Personal WeChat is far more common in many real-world communication scenarios. Compared with tools such as Feishu or DingTalk, personal WeChat setup is also much simpler for individual users.

Why

OpenFang already supports several messaging and collaboration channels, but personal WeChat support is especially useful because:

  • The iLink Bot API provides an official QR-code login flow for connecting a personal WeChat account to bot services, which makes this integration practical and straightforward.
  • personal WeChat is one of the most widely used communication tools
  • it covers many direct user-facing and daily communication scenarios
  • it is easier for individual users to set up than enterprise-focused tools
  • it lowers the barrier for connecting OpenFang to common personal communication workflows

What’s Included

This PR adds:

  • a new wechat channel using the standard OpenFang channel config style
  • QR-based login for personal WeChat authorization
  • persistence of authorized account state for reuse after restart
  • dashboard support for completing the WeChat setup flow
  • bridge startup and runtime wiring for the new channel

Implementation

  • adds the wechat channel wiring
  • adds QR login session start / status handling
  • persists authenticated WeChat account state locally
  • exposes the setup flow through the dashboard

Configuration

The new channel follows the existing OpenFang channel convention and does not introduce a separate config style.

Example:

[channels.wechat]
default_agent = "assistant"
allowed_users = []
state_dir = "./wechat-state"

Secrets can continue to be managed through the standard ~/.openfang/secret.env workflow.

Notes

This channel is specifically for personal WeChat.

It is different from wecom:

  • wecom is for enterprise / organizational messaging
  • wechat is for personal WeChat accounts

The goal of this PR is to make personal WeChat a first-class channel option in OpenFang.

Testing

Build / checks

  • cargo build --workspace --lib
  • cargo test --workspace

Manual verification

  • configured channels.wechat successfully
  • started OpenFang with the WeChat channel enabled
  • completed QR login through the setup flow
  • verified dashboard-based WeChat setup works
  • verified authorized account state can be reused after restart

@xinuxZ
Copy link
Author

xinuxZ commented Mar 22, 2026

I hope this PR gets merged soon. Personal WeChat is still the preferred option for most users, compared to enterprise tools like Feishu, DingTalk, or WeChat Work.

thx! thx! thx!

@xinuxZ
Copy link
Author

xinuxZ commented Mar 22, 2026

In China, the personal version of WeChat doesn't have an official API. The fact that Tencent is willing to provide API support is remarkable—it shows an unprecedented level of commitment from Tencent to the agent ecosystem. OpenClaw can work with personal WeChat accounts, and I hope OpenFang will support this as well.

Some extra context: This is a huge deal. With WeChat personal APIs opening up, AI agents can plug straight into the chat habits of 1.2 billion people—this totally changes the game for how agents are deployed. If OpenFang supports this, it’ll be a major differentiator.

IMG_0479 IMG_0480

@marcoziti
Copy link

A big boost to OpenFang community if support this super impactful social media platform.

@Avey777
Copy link

Avey777 commented Mar 23, 2026

Great job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants