diff --git a/CLAUDE.md b/CLAUDE.md index 9148f49..b85d26b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -67,7 +67,7 @@ The worker serves the frontend's static assets from `web/dist/` via the `ASSETS` - `lunar.ts` — Chinese lunar calendar support (1900–2100) - `currency.ts` — multi-currency / exchange rate conversion -**Notification services** (`worker/src/services/notify/`): Each channel (Telegram, Webhook, Email, Bark, Gotify, NotifyX, WeChatBot) is a separate file. `index.ts` fans out to all enabled channels, with optional per-item channel filtering via the `channels` parameter. +**Notification services** (`worker/src/services/notify/`): Each channel (Telegram, Webhook, Email, Bark, Slack, Feishu, Discord, WeChatBot) is a separate file. `index.ts` fans out to all enabled channels, with optional per-item channel filtering via the `channels` parameter. **Scheduler** (`worker/src/services/scheduler.ts`): Runs hourly via Cloudflare Cron Trigger (`0 * * * *`). For each active user it: diff --git a/README.en.md b/README.en.md index 44d29b8..972c63d 100644 --- a/README.en.md +++ b/README.en.md @@ -11,7 +11,7 @@ A smart notification management system that helps you track expiry dates and exp - **Auto-renewal** — Expired subscriptions are automatically renewed with payment history recorded - **Payment History** — Record every payment, multi-currency with real-time exchange rates - **Dashboard** — Monthly/yearly expense stats, expiry alerts, category analysis -- **8 Notification Channels** — Telegram, Webhook, WeChat Work, Email, Bark, Gotify, NotifyX, Slack +- **8 Notification Channels** — Telegram, Webhook, WeChat Work, Email, Bark, Slack, Feishu, Discord - **Channel Management** — Dedicated page to enable and configure notification channels - **Per-Item Channel Selection** — Each notification item can specify which channels to use; defaults to all enabled channels if unset - **Scheduled Reminders** — Hourly auto-check with global notification hours and per-item override diff --git a/README.md b/README.md index 102b368..19c02bd 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ - **自动续费** — 过期订阅自动续期并记录支付历史 - **支付历史** — 记录每笔支付,支持多币种与实时汇率转换 - **仪表盘** — 月度/年度支出统计、到期预警、分类分析 -- **8 个通知渠道** — Telegram、Webhook、企业微信、邮件、Bark、Gotify、NotifyX、Slack +- **8 个通知渠道** — Telegram、Webhook、企业微信、邮件、Bark、Slack、飞书、Discord - **渠道管理** — 独立页面统一管理通知渠道的启用与配置 - **按项选择渠道** — 每个通知项可单独指定使用哪些渠道,未指定则默认使用所有已启用渠道 - **定时提醒** — 每小时自动检查并发送到期提醒,支持全局时段配置和每项独立覆盖 diff --git a/web/src/components/ChannelSelector.tsx b/web/src/components/ChannelSelector.tsx index 07f784e..89628b2 100644 --- a/web/src/components/ChannelSelector.tsx +++ b/web/src/components/ChannelSelector.tsx @@ -186,13 +186,17 @@ export function ChannelSelector({
{selected.map((channelId) => { const channel = CHANNELS.find((ch) => ch.id === channelId); - if (!channel) return null; + // Unknown IDs are retired channels still stored on old items. They + // are not offered in the dropdown, but must stay removable here: + // otherwise the item could never be saved again (the API rejects + // retired IDs) and it would silently stop notifying. return ( - {channel.label} + {channel?.label ?? channelId}