From ba9f0ba7ed1ab81279514f54eb37a80ca03e5218 Mon Sep 17 00:00:00 2001 From: Arash Hatami Date: Tue, 25 Jul 2023 10:23:46 +0330 Subject: [PATCH] convert to lower case tag for telegram --- internal/platform/repositories/alert/telegram.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/platform/repositories/alert/telegram.go b/internal/platform/repositories/alert/telegram.go index c1226c7..eb33511 100644 --- a/internal/platform/repositories/alert/telegram.go +++ b/internal/platform/repositories/alert/telegram.go @@ -3,6 +3,7 @@ package alert import ( "encoding/json" "net/url" + "strings" "github.com/hatamiarash7/uptime-webhook/internal/models" log "github.com/sirupsen/logrus" @@ -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