diff options
author | Wim <wim@42.be> | 2018-02-03 23:31:21 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-02-03 23:31:21 +0100 |
commit | d4a47671ea3289a8076bee7c8f20452e42624415 (patch) | |
tree | 50bdee56310a1fcbc05b57b976f3bf98edc5dc71 /bridge/telegram | |
parent | 0bcd1e62f3125676d10bac2bcfc08a3ef00eb10b (diff) | |
download | matterbridge-msglm-d4a47671ea3289a8076bee7c8f20452e42624415.tar.gz matterbridge-msglm-d4a47671ea3289a8076bee7c8f20452e42624415.tar.bz2 matterbridge-msglm-d4a47671ea3289a8076bee7c8f20452e42624415.zip |
Add markdown support (telegram). #355
Diffstat (limited to 'bridge/telegram')
-rw-r--r-- | bridge/telegram/telegram.go | 6 |
1 files changed, 6 insertions, 0 deletions
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 |