feat(channel): support weichat channel (#620)

This commit is contained in:
Haze
2026-03-22 17:08:02 +08:00
committed by GitHub
Unverified
parent f12f4a74df
commit 1e7b40a486
32 changed files with 1610 additions and 156 deletions

View File

@@ -8,6 +8,7 @@
*/
export type ChannelType =
| 'whatsapp'
| 'wechat'
| 'dingtalk'
| 'telegram'
| 'discord'
@@ -81,6 +82,7 @@ export interface ChannelMeta {
*/
export const CHANNEL_ICONS: Record<ChannelType, string> = {
whatsapp: '📱',
wechat: '💬',
dingtalk: '💬',
telegram: '✈️',
discord: '🎮',
@@ -101,6 +103,7 @@ export const CHANNEL_ICONS: Record<ChannelType, string> = {
*/
export const CHANNEL_NAMES: Record<ChannelType, string> = {
whatsapp: 'WhatsApp',
wechat: 'WeChat',
dingtalk: 'DingTalk',
telegram: 'Telegram',
discord: 'Discord',
@@ -323,6 +326,22 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
'channels:meta.whatsapp.instructions.3',
],
},
wechat: {
id: 'wechat',
name: 'WeChat',
icon: '💬',
description: 'channels:meta.wechat.description',
connectionType: 'qr',
docsUrl: 'channels:meta.wechat.docsUrl',
configFields: [],
instructions: [
'channels:meta.wechat.instructions.0',
'channels:meta.wechat.instructions.1',
'channels:meta.wechat.instructions.2',
'channels:meta.wechat.instructions.3',
],
isPlugin: true,
},
signal: {
id: 'signal',
name: 'Signal',
@@ -561,7 +580,7 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
* Get primary supported channels (non-plugin, commonly used)
*/
export function getPrimaryChannels(): ChannelType[] {
return ['telegram', 'discord', 'whatsapp', 'dingtalk', 'feishu', 'wecom', 'qqbot'];
return ['telegram', 'discord', 'whatsapp', 'wechat', 'dingtalk', 'feishu', 'wecom', 'qqbot'];
}
/**