feat(cron): enable WeChat as a supported delivery channel (#789)

This commit is contained in:
paisley
2026-04-07 18:56:54 +08:00
committed by GitHub
Unverified
parent 97d29ab23c
commit 3021ad5089
10 changed files with 92 additions and 23 deletions

View File

@@ -45,7 +45,7 @@
"selectDeliveryAccount": "Select an account",
"deliveryAccountDesc": "Uses the same configured account list shown on the Channels page.",
"selectChannel": "Select a channel",
"deliveryChannelUnsupported": "WeChat does not currently support scheduled outbound delivery because the plugin requires a live conversation context token.",
"deliveryChannelUnsupported": "{{channel}} does not currently support scheduled outbound delivery.",
"deliveryDefaultAccountHint": "Uses the channel's default account: {{account}}",
"deliveryTarget": "Recipient / Target",
"selectDeliveryTarget": "Select a delivery target",

View File

@@ -45,7 +45,7 @@
"selectDeliveryAccount": "选择账号",
"deliveryAccountDesc": "这里直接复用 Channels 页面里的已配置账号列表。",
"selectChannel": "选择通道",
"deliveryChannelUnsupported": "微信通道当前不支持定时任务主动投递,因为插件要求实时会话里的 contextToken。",
"deliveryChannelUnsupported": "{{channel}} 通道当前不支持定时任务主动投递。",
"deliveryDefaultAccountHint": "将使用该通道当前的默认账号:{{account}}",
"deliveryTarget": "接收目标",
"selectDeliveryTarget": "选择接收目标",

View File

@@ -205,7 +205,7 @@ function getDeliveryAccountDisplayName(account: DeliveryChannelAccount, t: TFunc
: account.name;
}
const TESTED_CRON_DELIVERY_CHANNELS = new Set<string>(['feishu', 'telegram', 'qqbot', 'wecom']);
const TESTED_CRON_DELIVERY_CHANNELS = new Set<string>(['feishu', 'telegram', 'qqbot', 'wecom', 'wechat']);
function isSupportedCronDeliveryChannel(channelType: string): boolean {
return TESTED_CRON_DELIVERY_CHANNELS.has(channelType);
@@ -573,7 +573,7 @@ function TaskDialog({ job, configuredChannels, onClose, onSave }: TaskDialogProp
<p className="text-[12px] text-muted-foreground">{t('dialog.noChannels')}</p>
)}
{unsupportedDeliveryChannel && (
<p className="text-[12px] text-destructive">{t('dialog.deliveryChannelUnsupported')}</p>
<p className="text-[12px] text-destructive">{t('dialog.deliveryChannelUnsupported', { channel: getChannelDisplayName(effectiveDeliveryChannel) })}</p>
)}
{selectedChannel && (
<p className="text-[12px] text-muted-foreground">