From 40fac3a6f3aadc5b533b706a1a725a5f5ebd5e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Z=C3=ADpek?= Date: Sun, 28 Apr 2024 07:23:18 +0200 Subject: [PATCH] Fix custom resolved message not being used for last contact alert --- server/integrations/telegram.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/integrations/telegram.go b/server/integrations/telegram.go index 5dc5387..dcb7881 100644 --- a/server/integrations/telegram.go +++ b/server/integrations/telegram.go @@ -87,8 +87,8 @@ func (s TelegramIntegration) ProcessEvent(evt *ContactPointEvent, rawConfig stri if data.SensorLastContactCondition != nil { text := fmt.Sprintf("✅ %s has reported in last %s %s", data.Sensor.Name, strconv.FormatFloat(data.SensorLastContactCondition.Value, 'f', -1, 64), data.SensorLastContactCondition.ValueUnit) - if data.Alert.CustomMessage != "" { - text = data.Alert.CustomMessage + if data.Alert.CustomResolvedMessage != "" { + text = data.Alert.CustomResolvedMessage } msg := tgbotapi.NewMessage(config.TargetChannel, text)