Skip to content

Commit

Permalink
convert to lower case tag for telegram
Browse files Browse the repository at this point in the history
  • Loading branch information
hatamiarash7 committed Jul 25, 2023
1 parent aed9547 commit ba9f0ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/platform/repositories/alert/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package alert
import (
"encoding/json"
"net/url"
"strings"

"github.com/hatamiarash7/uptime-webhook/internal/models"
log "github.com/sirupsen/logrus"
Expand All @@ -13,7 +14,7 @@ func (r *Repository) CreateTelegramMessage(alert models.Alert) error {
var urls []string

for _, tag := range alert.Data.Service.Tags {
team, ok := r.config.Notifier.Telegram.Teams[tag]
team, ok := r.config.Notifier.Telegram.Teams[strings.ToLower(tag)]
if !ok {
log.Errorf("[Telegram] Team not found for tag: %s", tag)
continue
Expand Down

0 comments on commit ba9f0ba

Please sign in to comment.