feat: support wecom (#372)

Co-authored-by: DigHuang <114602213+DigHuang@users.noreply.github.com>
This commit is contained in:
paisley
2026-03-10 12:06:37 +08:00
committed by GitHub
Unverified
parent 905ce02b0b
commit b86f47171b
13 changed files with 326 additions and 54 deletions

View File

@@ -13,6 +13,7 @@ export type ChannelType =
| 'discord'
| 'signal'
| 'feishu'
| 'wecom'
| 'imessage'
| 'matrix'
| 'line'
@@ -84,6 +85,7 @@ export const CHANNEL_ICONS: Record<ChannelType, string> = {
discord: '🎮',
signal: '🔒',
feishu: '🐦',
wecom: '💼',
imessage: '💬',
matrix: '🔗',
line: '🟢',
@@ -102,6 +104,7 @@ export const CHANNEL_NAMES: Record<ChannelType, string> = {
discord: 'Discord',
signal: 'Signal',
feishu: 'Feishu / Lark',
wecom: 'WeCom',
imessage: 'iMessage',
matrix: 'Matrix',
line: 'LINE',
@@ -166,6 +169,36 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
],
isPlugin: true,
},
wecom: {
id: 'wecom',
name: 'WeCom',
icon: '💼',
description: 'channels:meta.wecom.description',
connectionType: 'token',
docsUrl: 'channels:meta.wecom.docsUrl',
configFields: [
{
key: 'botId',
label: 'channels:meta.wecom.fields.botId.label',
type: 'text',
placeholder: 'channels:meta.wecom.fields.botId.placeholder',
required: true,
},
{
key: 'secret',
label: 'channels:meta.wecom.fields.secret.label',
type: 'password',
placeholder: 'channels:meta.wecom.fields.secret.placeholder',
required: true,
},
],
instructions: [
'channels:meta.wecom.instructions.0',
'channels:meta.wecom.instructions.1',
'channels:meta.wecom.instructions.2',
],
isPlugin: true,
},
telegram: {
id: 'telegram',
name: 'Telegram',
@@ -496,7 +529,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'];
return ['telegram', 'discord', 'whatsapp', 'dingtalk', 'feishu', 'wecom'];
}
/**