Commit Graph
6 Commits
Author SHA1 Message Date
DrSmoothl 7c0519f75f lint 2026-10-12 15:43:34 +08:00
DrSmoothl f2d58d2f79 feat(notifications): deliver online/offline alerts over SMTP
Fixes #459
2026-09-16 10:36:04 +08:00
DrSmoothl 60c9669abd feat(core): allow custom request headers on notification channels
Operators can attach Authorization and other headers to a webhook
channel so authenticated providers work without a separate proxy.

Fixes #451
2026-09-14 19:34:29 +08:00
DrSmoothl 8940f8864b fix(config): protect operator credentials
Keep first-run access details confined to the active process console and remove development credentials from managed application logs.

Treat notification delivery settings as sensitive during backup and restore, preserve private file access across creation and updates, and align the WebUI guidance with the new boundary.
2026-08-01 17:02:39 +08:00
渡辺鳩P 06c8954881 feat(notifications): default body template → Server酱 JSON (title/desp) (#108)
- Change DEFAULT_BODY_TEMPLATE from plaintext to Server酱-style JSON
- Add JSON-safe escaping in renderTemplate for backslashes and quotes
- Update frontend DEFAULT_TEMPLATE to match backend
- Add tests for JSON escaping behavior

Fixes #106 (targets dev branch)
2026-06-18 16:10:09 +08:00
DrSmoothl 34d05f41f5 feat(notifications): P1 config layer — global channel store + per-UIN opt-in
Global channel store at config/notifications.json, mirroring ui-config's
total-normalize + atomic-write + cached-load conventions: NotificationsConfig
(version, debounceSeconds clamp [0,3600] default 30, channels[]), a total
normalizeNotificationsConfig (drops malformed/non-http channels, dedupes by
id, strips unknown fields), and the pure renderTemplate ({key} substitution;
missing keys left as-is; no re-expansion of substituted values).

Per-UIN opt-in: OneBotConfig.notifications.channelIds (validated slugs,
last-write-wins merge across global+per-uin, deduped) in the onebot package.

Tests: 19 (core notifications-config) + 12 (onebot config), all green.
Adversarial review: 0 blockers / 0 should-fix.
2026-06-16 19:02:01 +08:00