From 6c00f855b36d8942aa32c5b5eb171cea4442bf89 Mon Sep 17 00:00:00 2001 From: Kien Nguyen Date: Mon, 9 Sep 2024 14:47:38 +0700 Subject: [PATCH] fix(telegram): passing ParseMode when sending message Before commit [1], the message parse mode value is the same as bot parse mode. Therefore, we don't need to pass ParseMode whenever sending message. But after that commit, if we don't pass SendOpts's ParseMode, the library will use the default mode which is empty string "". [1] https://github.com/tucnak/telebot/commit/864bef4e4d3a60b8079db4fdb51cac2e779349cd Signed-off-by: Kien Nguyen --- notify/telegram/telegram.go | 1 + 1 file changed, 1 insertion(+) diff --git a/notify/telegram/telegram.go b/notify/telegram/telegram.go index fd61714211..c74393fd6d 100644 --- a/notify/telegram/telegram.go +++ b/notify/telegram/telegram.go @@ -94,6 +94,7 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err DisableNotification: n.conf.DisableNotifications, DisableWebPagePreview: true, ThreadID: n.conf.MessageThreadID, + ParseMode: n.conf.ParseMode, }) if err != nil { return true, err