mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #4894] [MERGED] fix(tgbot): ignore commands for other bots #5741
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#5741
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/4894
Author: @kanghouchao
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @MHSanaei
Base:
main← Head:fix/telegram-command-target📝 Commits (1)
a9cfbf2fix(tgbot): ignore commands for other bots📊 Changes
2 files changed (+44 additions, -0 deletions)
View changed files
📝
web/service/tgbot.go(+20 -0)📝
web/service/tgbot_test.go(+24 -0)📄 Description
Summary
Ignore Telegram commands that explicitly target a different bot username before the 3x-ui bot command handler clears state or sends a response.
Why
Telegram groups can contain multiple bots. When a user sends a command like /status@other_bot, 3x-ui should not process it as its own command.
Closes #4893
Type of change
Areas affected
How was this tested?
npm cinpm run buildgo test ./...go build ./...Screenshots / recordings
N/A
Breaking changes
None
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.