Add possibility to remove client email from sub (#4297)

This commit is contained in:
Vladislav Kasperov
2026-05-13 20:04:17 +03:00
committed by GitHub
parent 5543466fcc
commit 67b098dfd3
18 changed files with 49 additions and 1 deletions
+8 -1
View File
@@ -28,6 +28,7 @@ type SubService struct {
showInfo bool
remarkModel string
datepicker string
emailInRemark bool
inboundService service.InboundService
settingService service.SettingService
// nodesByID is populated per request from the Node table so
@@ -76,6 +77,12 @@ func (s *SubService) GetSubs(subId string, host string) ([]string, int64, xray.C
if err != nil {
s.datepicker = "gregorian"
}
s.emailInRemark, err = s.settingService.GetSubEmailInRemark()
if err != nil {
s.emailInRemark = true
}
seenEmails := make(map[string]struct{})
for _, inbound := range inbounds {
clients, err := s.inboundService.GetClients(inbound)
@@ -886,7 +893,7 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin
'e': "",
'o': "",
}
if len(email) > 0 {
if len(email) > 0 && s.emailInRemark {
orders['e'] = email
}
if len(inbound.Remark) > 0 {