Fix custom resolved message not being used for last contact alert
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
0bf63f64a2
commit
40fac3a6f3
|
|
@ -87,8 +87,8 @@ func (s TelegramIntegration) ProcessEvent(evt *ContactPointEvent, rawConfig stri
|
||||||
|
|
||||||
if data.SensorLastContactCondition != nil {
|
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)
|
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 != "" {
|
if data.Alert.CustomResolvedMessage != "" {
|
||||||
text = data.Alert.CustomMessage
|
text = data.Alert.CustomResolvedMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := tgbotapi.NewMessage(config.TargetChannel, text)
|
msg := tgbotapi.NewMessage(config.TargetChannel, text)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue