Repository navigation
移除 ServerChan 与 PushPlus 两个渠道 - #131
Merged
todosdev[bot] merged 2 commits intoOct 20, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
notification_configs.enabled_channels中剔除这两个 ID,避免摘掉 sender 后每次推送都写 "Unknown channel" 失败记录。items.channels、notification_history、me.ts脱敏名单按规格保持不动。Changes
worker
services/notify/serverchan.ts、services/notify/pushplus.ts,并从notify/index.ts的CHANNEL_SENDERS摘除注册。types.ts:VALID_CHANNELS与NotificationConfig移除两个渠道;routes/me.ts、routes/items.ts按白名单迭代,无需改动。lib/setup.ts的runMigrations():新增逐行清理迁移(坏 JSON 行跳过、仅在有变化时 UPDATE、天然幂等),只改enabled_channels,不动updated_at。db/schema.sql与getSchema()同步删两列(仅影响全新安装);db/queries/notifications.ts的 upsert 列名单删两项。web
lib/channels.ts、pages/channels/ChannelPage.tsx删除两个渠道定义(渠道页与 item 选择器均只剩 8 个)。locales/zh.json、en.json删除channels.serverchan/pushplus及已无引用的sendKey/topic/channelName;通用token保留。docs / tests
CLAUDE.md、README.md、README.en.md更新为 8 个渠道。worker/test/migrations.test.ts保留老库 fixture 的两列,新增清理迁移、幂等、坏行容错(坏行之后的 u4 仍被清理)、迁移后发送无 Unknown channel、全新安装无两列等用例。Testing
pnpm typecheck、pnpm build、pnpm test(33 项)全绿;biome lint/biome format通过(仅剩两处与本次无关的既有告警)。try/catch后,清理迁移用例如预期失败(u4 未被处理),恢复后全绿。serverchan|pushplus仅命中迁移代码与测试 fixture/用例。POST /api/admin/setup执行迁移,否则残留 ID 会继续产生失败记录、渠道开关表现为“点了没反应”。真实渠道冒烟(Telegram、企业微信)需部署后由管理员用真实凭据完成。