Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sub/subService.go4
-rw-r--r--web/service/tgbot.go2
2 files changed, 5 insertions, 1 deletions
diff --git a/sub/subService.go b/sub/subService.go
index 0ed1d454..da286641 100644
--- a/sub/subService.go
+++ b/sub/subService.go
@@ -45,6 +45,10 @@ func (s *SubService) GetSubs(subId string, host string) ([]string, string, error
return nil, "", err
}
+ if len(inbounds) == 0 {
+ return nil, "", common.NewError("No inbounds found with ", subId)
+ }
+
s.datepicker, err = s.settingService.GetDatepicker()
if err != nil {
s.datepicker = "gregorian"
diff --git a/web/service/tgbot.go b/web/service/tgbot.go
index d534f3ac..7afa61e3 100644
--- a/web/service/tgbot.go
+++ b/web/service/tgbot.go
@@ -1469,7 +1469,7 @@ func (t *Tgbot) notifyExhausted() {
var disabledClients []xray.ClientTraffic
var exhaustedClients []xray.ClientTraffic
traffics, err := t.inboundService.GetClientTrafficTgBot(client.TgID)
- if err == nil {
+ if err == nil && len(traffics) > 0 {
output := t.I18nBot("tgbot.messages.exhaustedCount", "Type=="+t.I18nBot("tgbot.clients"))
for _, traffic := range traffics {
if traffic.Enable {