mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6235] [Feature]: Add built in support chatbot integration #4231
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#4231
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?
Originally created by @LORD07Sson on GitHub (Aug 17, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6235
Is your feature request related to a problem?
X-UI currently does not have a built in support chat system. It would be useful to have an integrated chatbot that allows users to contact the administrator/support directly, without needing to manually find and contact the administrator through another service.
For example, a user could open the support bot, send a message or describe their problem, and the message would be forwarded to the administrator. The administrator could then reply to the user through the bot
Describe the solution you'd like
Add a built in support chatbot to X-UI, for example through Telegram. The bot should primarily work as a support chat between users and the administrator
Alternatives you've considered
For your consideration
Concrete use case
For example, I manage a server with many users who connect through x-ui. When a user has a problem with their connection, subscription or configuration, they currently have to contact the administrator through a separate messenger
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
Telegram bot, Backend (API endpoints, login, settings)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Aug 17, 2026):
There is no built-in support-chat relay in the panel today, so this is a valid feature request rather than something already available under a different name. I checked the Telegram bot code and confirmed what exists and what is missing.
What the bot already does for non-admin users:
tgIdfield,internal/database/model/model.go:923) get a reduced inline keyboard built ininternal/web/service/tgbot/tgbot_send.go:57— own traffic usage,/usageand/idhelp, subscription links, individual links, and QR codes.internal/web/service/inbound_traffic.go:948(GetClientTrafficTgBot) already resolves a Telegram user ID to that user's clients, so the identity plumbing your idea needs is in place.What is missing for a support chat:
internal/web/service/tgbot/tgbot_router.go:144-166, a plain message is only acted on when a multi-step wizard state is active or when it carries a shared-user payload; anything else is silently dropped with no reply.isClientSelfCallback(internal/web/service/tgbot/tgbot_router.go:1483) allowlists exactly five client actions, and everything else returns early at line 1077.SendMsgToTgbotAdmins(internal/web/service/tgbot/tgbot_send.go:161) fans a message out to every configured admin ID, anduserStateMgris the existing pattern for holding conversation state.The admin-to-user direction is the harder half, and worth flagging for whoever picks this up: replying to a specific user requires persisting a mapping from an admin-side message to the originating chat, and nothing in the schema stores that today, so it would need a new model plus a migration in
internal/database/db.go. Two further constraints: the bot has no per-user rate limiting, so an open relay is reachable by any Telegram account that finds the bot unless it is restricted to users with a linkedtgId; and any new user-facing string has to be added to all 13 locale files ininternal/web/translation/.As a partial workaround right now, the
subSupportUrlsetting (Subscription settings) is served both on the subscription info page and as theSupport-Urlheader (internal/sub/controller.go:822), which several clients render as a support button. Pointing it at your Telegram account gives users a one-tap route to you without leaving their client app.I am not able to say whether or when this gets implemented — that is the maintainers' call. You left both help checkboxes unchecked; if you or anyone else wants to attempt it, the file list above is the surface area involved.
This reply was generated automatically. A maintainer may follow up.