mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #7086] feat(wechat): add WeCom and webhook notifications #6641
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6641
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/7086
Author: @3356153957
Created: 11/5/2026
Status: 🔄 Open
Base:
main← Head:codex/wechat-notifications-pr📝 Commits (1)
6d7155ffeat(wechat): add independent alerts and scheduled reports📊 Changes
55 files changed (+3985 additions, -60 deletions)
View changed files
📝
docs/content/docs/en/operations/meta.json(+1 -0)➕
docs/content/docs/en/operations/wechat-notifications.mdx(+62 -0)📝
docs/content/docs/en/reference/api/settings.mdx(+10 -1)📝
docs/content/docs/zh/operations/meta.json(+1 -0)➕
docs/content/docs/zh/operations/wechat-notifications.mdx(+60 -0)➕
docs/public/images/wechat-settings.png(+0 -0)📝
docs/public/openapi.json(+128 -2)📝
frontend/public/openapi.json(+128 -2)➕
frontend/src/components/ui/notifications/WechatNotifications.stories.tsx(+96 -0)➕
frontend/src/components/ui/notifications/WechatNotifications.tsx(+160 -0)📝
frontend/src/generated/examples.ts(+24 -2)📝
frontend/src/generated/schemas.ts(+98 -2)📝
frontend/src/generated/types.ts(+22 -0)📝
frontend/src/generated/zod.ts(+22 -0)📝
frontend/src/layouts/AppSidebar.tsx(+6 -0)📝
frontend/src/models/setting.ts(+15 -1)📝
frontend/src/pages/api-docs/endpoints.ts(+6 -0)📝
frontend/src/pages/settings/SettingsPage.tsx(+11 -1)➕
frontend/src/pages/settings/WechatTab.stories.tsx(+62 -0)➕
frontend/src/pages/settings/WechatTab.tsx(+235 -0)...and 35 more files
📄 Description
Summary
Add an optional WeChat notification channel with its own settings, event filters, language, CPU/memory thresholds, and scheduled reports. It supports WeCom group robots directly and a documented HTTPS webhook protocol for external gateways, without enabling Telegram or changing other channels' configuration.
Why
Administrators can receive panel alerts through their WeCom group or an existing WeChat gateway. Personal WeChat requires an external bridge; this PR does not include a personal WeChat login, bot protocol, or a particular gateway implementation.
The channel is disabled by default and sends text only. Reports contain resource usage, deduplicated client traffic/quota summaries, and inbound/client counts. It does not send subscription links, client configuration files, or database backups, and has no remote commands.
Type of change
Areas affected
Implementation
errcodeverification without automatic retry.How was this tested?
go build -p 1 ./...andgo test -json -p 1 -shuffle=on -count=1 ./...passed: 54 packages, 6,285 passing test/subtest events and 70 skips. Environment-dependent tests (including PostgreSQL tests without a configured DSN) remain skipped.-race -shuffle=on. Coverage includes ASCII/Unicode case variants, shared-client deduplication, per-field zero-value fallback, nonzero runtime limits, 501 identities, query parameter limits, context cancellation, and unchanged database rows. After this report-only correction, the final committed source was rebuilt on Linux and all five affected backend packages were rerun (2,808 passing test/subtest events, 47 environment-dependent skips); the complete WeChat provider race suite passed again (43 passing events). All test inputs were verified against the frozen source manifest.The direct WeCom API behavior is covered by HTTP transport tests; a live enterprise group robot was not used. Windows full-suite probes also reproduce the existing IPv6 socket restriction on clean upstream; the complete backend suite was therefore run on Linux, followed by the final-source validation detailed above.
Screenshots
Breaking changes
None. Existing notification settings retain their behavior. No dependency changes or database schema migration.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.