From 497b43fc412c8850ff31a8d7cd437581d1f8965e Mon Sep 17 00:00:00 2001 From: samvel2406 <148013045+samvel2406@users.noreply.github.com> Date: Sun, 2 Mar 2025 02:05:38 +0300 Subject: [PATCH] Update subService.go --- sub/subService.go | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/sub/subService.go b/sub/subService.go index f52d4b67..3281624c 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -868,7 +868,7 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin 'o': "", } if len(email) > 0 { - orders['e'] = email + orders['e'] = "🇷🇺 Москва - 🇩🇪 Германия" } if len(inbound.Remark) > 0 { orders['i'] = inbound.Remark @@ -900,7 +900,7 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin // Get remained days if statsExist { if !stats.Enable { - return fmt.Sprintf("⛔️N/A%s%s", separationChar, strings.Join(remark, separationChar)) + return "Срок действия подписки истёк ⛔️" } if vol := stats.Total - (stats.Up + stats.Down); vol > 0 { remark = append(remark, fmt.Sprintf("%s%s", common.FormatTraffic(vol), "📊")) @@ -912,32 +912,12 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin days := remainingSeconds / 86400 hours := (remainingSeconds % 86400) / 3600 minutes := (remainingSeconds % 3600) / 60 - if days > 0 { - if hours > 0 { - remark = append(remark, fmt.Sprintf("%dD,%dH⏳", days, hours)) - } else { - remark = append(remark, fmt.Sprintf("%dD⏳", days)) - } - } else if hours > 0 { - remark = append(remark, fmt.Sprintf("%dH⏳", hours)) - } else { - remark = append(remark, fmt.Sprintf("%dM⏳", minutes)) - } + remark = append(remark, fmt.Sprintf("%dд.,%dч., %dм. ⏳", days, hours, minutes)) case exp < 0: days := exp / -86400 hours := (exp % -86400) / 3600 minutes := (exp % -3600) / 60 - if days > 0 { - if hours > 0 { - remark = append(remark, fmt.Sprintf("%dD,%dH⏳", days, hours)) - } else { - remark = append(remark, fmt.Sprintf("%dD⏳", days)) - } - } else if hours > 0 { - remark = append(remark, fmt.Sprintf("%dH⏳", hours)) - } else { - remark = append(remark, fmt.Sprintf("%dM⏳", minutes)) - } + remark = append(remark, fmt.Sprintf("%dд.,%dч., %dм. ⏳", days, hours, minutes)) } } }