Skip to content

Commit ba9f0ba

Browse files
committed
convert to lower case tag for telegram
1 parent aed9547 commit ba9f0ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/platform/repositories/alert/telegram.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package alert
33
import (
44
"encoding/json"
55
"net/url"
6+
"strings"
67

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

1516
for _, tag := range alert.Data.Service.Tags {
16-
team, ok := r.config.Notifier.Telegram.Teams[tag]
17+
team, ok := r.config.Notifier.Telegram.Teams[strings.ToLower(tag)]
1718
if !ok {
1819
log.Errorf("[Telegram] Team not found for tag: %s", tag)
1920
continue

0 commit comments

Comments
 (0)