summaryrefslogtreecommitdiffstats
path: root/bridge/telegram
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-06-18 23:49:28 +0200
committerWim <wim@42.be>2018-06-18 23:49:28 +0200
commit221a63d980d4bb3a8884b2dfbf7f01d7d7d70d55 (patch)
tree9cd667f7a4fb6fdcf4bb7f4ab1a7733b57291807 /bridge/telegram
parentd02eda147ce406dc1d223e840d48ec50894c96cb (diff)
downloadmatterbridge-msglm-221a63d980d4bb3a8884b2dfbf7f01d7d7d70d55.tar.gz
matterbridge-msglm-221a63d980d4bb3a8884b2dfbf7f01d7d7d70d55.tar.bz2
matterbridge-msglm-221a63d980d4bb3a8884b2dfbf7f01d7d7d70d55.zip
Fix build (telegram)
Diffstat (limited to 'bridge/telegram')
-rw-r--r--bridge/telegram/telegram.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go
index 805d967c..378f383d 100644
--- a/bridge/telegram/telegram.go
+++ b/bridge/telegram/telegram.go
@@ -101,7 +101,6 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
if strings.ToLower(b.GetString("MessageFormat")) == "htmlnick" {
b.Log.Debug("Using mode HTML - nick only")
msg.Text = html.EscapeString(msg.Text)
- m.ParseMode = tgbotapi.ModeHTML
}
m := tgbotapi.NewEditMessageText(chatid, msgid, msg.Username+msg.Text)
if b.GetString("MessageFormat") == "HTML" {
@@ -112,6 +111,10 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
b.Log.Debug("Using mode markdown")
m.ParseMode = tgbotapi.ModeMarkdown
}
+ if strings.ToLower(b.GetString("MessageFormat")) == "htmlnick" {
+ b.Log.Debug("Using mode HTML - nick only")
+ m.ParseMode = tgbotapi.ModeHTML
+ }
_, err = b.c.Send(m)
if err != nil {
return "", err