From 8129c04ec5abb93f4bbcd4a724cec0b4e60fdde2 Mon Sep 17 00:00:00 2001 From: milarin Date: Fri, 20 Jan 2023 14:31:27 +0100 Subject: [PATCH] dont send empty telegram messages --- telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram.go b/telegram.go index b543ce9..d1d5a84 100644 --- a/telegram.go +++ b/telegram.go @@ -23,7 +23,7 @@ func InitTelegramBot() error { } func SendTelegramMessage(text string) { - if TelegramBot == nil { + if TelegramBot == nil || strings.TrimSpace(text) == "" { return }