Skip to content

Commit

Permalink
Small fixes (#2106)
Browse files Browse the repository at this point in the history
  • Loading branch information
somebodywashere committed Mar 21, 2024
1 parent c5b30d6 commit 43ec88b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions sub/subService.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion web/service/tgbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 43ec88b

Please sign in to comment.