mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-29 15:11:36 +00:00
Fix build (telegram)
This commit is contained in:
parent
d02eda147c
commit
221a63d980
@ -101,7 +101,6 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
|
|||||||
if strings.ToLower(b.GetString("MessageFormat")) == "htmlnick" {
|
if strings.ToLower(b.GetString("MessageFormat")) == "htmlnick" {
|
||||||
b.Log.Debug("Using mode HTML - nick only")
|
b.Log.Debug("Using mode HTML - nick only")
|
||||||
msg.Text = html.EscapeString(msg.Text)
|
msg.Text = html.EscapeString(msg.Text)
|
||||||
m.ParseMode = tgbotapi.ModeHTML
|
|
||||||
}
|
}
|
||||||
m := tgbotapi.NewEditMessageText(chatid, msgid, msg.Username+msg.Text)
|
m := tgbotapi.NewEditMessageText(chatid, msgid, msg.Username+msg.Text)
|
||||||
if b.GetString("MessageFormat") == "HTML" {
|
if b.GetString("MessageFormat") == "HTML" {
|
||||||
@ -112,6 +111,10 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
|
|||||||
b.Log.Debug("Using mode markdown")
|
b.Log.Debug("Using mode markdown")
|
||||||
m.ParseMode = tgbotapi.ModeMarkdown
|
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)
|
_, err = b.c.Send(m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
Loading…
Reference in New Issue
Block a user