Skip to content

feat: 新增 WPUSH 通知渠道 - #206

Merged
wangwangit merged 1 commit into
wangwangit:masterfrom
anhao:feat/wpush-notify
Sep 26, 2026
Merged

wangwangit merged 1 commit into
wangwangit:masterfrom
anhao:feat/wpush-notify

Conversation

@anhao

@anhao anhao commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

概述

新增 WPUSH 通知渠道,镜像现有 PushPlus 适配器模式接入调度器与配置页。

改动

  • 新增 src/services/notify/wpush.js:POST https://api.wpush.cn/api/v1/send,仅当响应 JSON code === 0 视为成功
  • 在 dispatch.js 的 ALL_CHANNELS 注册 wpush
  • 配置项:WPUSH_APIKEY(敏感字段脱敏)、可选 WPUSH_CHANNEL / WPUSH_TOPIC_CODE
  • 配置页勾选、表单、测试发送按钮;/api/test-notification 支持 type=wpush
  • 单元测试覆盖成功 / 失败 / 缺配置,并断言错误信息不泄露 apikey

使用

系统配置 → 勾选 WPUSH → 填写 API Key → 可选渠道 / Topic 编码 → 点「测试 WPUSH 通知」。

验证

npm test -- tests/services/notify/channels.test.js
# 41 passed

镜像 PushPlus 适配器新增 wpush 渠道:POST https://api.wpush.cn/api/v1/send,
仅当响应 JSON code===0 视为成功;支持可选 channel / topic_code;API Key 脱敏不落日志。
接入 dispatch 注册表、配置页、测试发送与单元测试。
@wangwangit
wangwangit merged commit ed78a88 into wangwangit:master Sep 26, 2026
@wangwangit

Copy link
Copy Markdown
Owner

感谢接入 WPUSH!这个通知渠道已合入。合入后我补强了第三方失败响应的日志字段,避免响应回显 API Key 时写入日志;也修正了测试发送清空 Channel/Topic 后仍使用旧配置的问题。相关测试、页面配置保存与密钥隐藏验证、部署检查均已通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants