From d4a47671ea3289a8076bee7c8f20452e42624415 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 3 Feb 2018 23:31:21 +0100 Subject: Add markdown support (telegram). #355 --- bridge/telegram/telegram.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 6e78e819..5c6de447 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -89,6 +89,9 @@ func (b *Btelegram) Send(msg config.Message) (string, error) { if b.Config.MessageFormat == "HTML" { m.ParseMode = tgbotapi.ModeHTML } + if b.Config.MessageFormat == "Markdown" { + m.ParseMode = tgbotapi.ModeMarkdown + } _, err = b.c.Send(m) if err != nil { return "", err @@ -324,6 +327,9 @@ func (b *Btelegram) sendMessage(chatid int64, text string) (string, error) { if b.Config.MessageFormat == "HTML" { m.ParseMode = tgbotapi.ModeHTML } + if b.Config.MessageFormat == "Markdown" { + m.ParseMode = tgbotapi.ModeMarkdown + } res, err := b.c.Send(m) if err != nil { return "", err -- cgit v1.2.3