mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6050] [MERGED] fix(clients): allow case-only email updates without duplicates #6063
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#6063
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/6050
Author: @H-TTTTT
Created: 7/20/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @MHSanaei
Base:
main← Head:fix/email-case-update📝 Commits (1)
a948b0afix(clients): allow case-only email updates without duplicates📊 Changes
2 files changed (+33 additions, -1 deletions)
View changed files
📝
internal/web/service/client_inbound_apply.go(+3 -1)📝
internal/web/service/client_update_rename_test.go(+30 -0)📄 Description
Summary
clientsrow on any byte-level email change inUpdateInboundClient, not only when!strings.EqualFold.test→Test) from creating a duplicate row and then failing withUNIQUE constraint failed: clients.email.Root cause
EqualFold→ skipped case-only renames.SyncInboundlooks up by exact email → creates a new record forTest.ClientService.Updatethen collides with the new row.Test plan
go test ./internal/web/service/ -run 'TestUpdateInboundClient.*Rename|TestClientUpdateDuplicate'test→Test→ single row, no SQL errorold@x→new@xstill worksFixes #5951
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.