mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 21:50:28 +00:00
Add more parsemode debug (telegram)
This commit is contained in:
parent
e8b3e9b22d
commit
432cd0f99d
@ -87,9 +87,11 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
|
|||||||
}
|
}
|
||||||
m := tgbotapi.NewEditMessageText(chatid, msgid, msg.Username+msg.Text)
|
m := tgbotapi.NewEditMessageText(chatid, msgid, msg.Username+msg.Text)
|
||||||
if b.Config.MessageFormat == "HTML" {
|
if b.Config.MessageFormat == "HTML" {
|
||||||
|
flog.Debug("Using mode HTML")
|
||||||
m.ParseMode = tgbotapi.ModeHTML
|
m.ParseMode = tgbotapi.ModeHTML
|
||||||
}
|
}
|
||||||
if b.Config.MessageFormat == "Markdown" {
|
if b.Config.MessageFormat == "Markdown" {
|
||||||
|
flog.Debug("Using mode markdown")
|
||||||
m.ParseMode = tgbotapi.ModeMarkdown
|
m.ParseMode = tgbotapi.ModeMarkdown
|
||||||
}
|
}
|
||||||
_, err = b.c.Send(m)
|
_, err = b.c.Send(m)
|
||||||
@ -325,9 +327,11 @@ func (b *Btelegram) handleDownload(file interface{}, comment string, msg *config
|
|||||||
func (b *Btelegram) sendMessage(chatid int64, text string) (string, error) {
|
func (b *Btelegram) sendMessage(chatid int64, text string) (string, error) {
|
||||||
m := tgbotapi.NewMessage(chatid, text)
|
m := tgbotapi.NewMessage(chatid, text)
|
||||||
if b.Config.MessageFormat == "HTML" {
|
if b.Config.MessageFormat == "HTML" {
|
||||||
|
flog.Debug("Using mode HTML")
|
||||||
m.ParseMode = tgbotapi.ModeHTML
|
m.ParseMode = tgbotapi.ModeHTML
|
||||||
}
|
}
|
||||||
if b.Config.MessageFormat == "Markdown" {
|
if b.Config.MessageFormat == "Markdown" {
|
||||||
|
flog.Debug("Using mode markdown")
|
||||||
m.ParseMode = tgbotapi.ModeMarkdown
|
m.ParseMode = tgbotapi.ModeMarkdown
|
||||||
}
|
}
|
||||||
res, err := b.c.Send(m)
|
res, err := b.c.Send(m)
|
||||||
|
Loading…
Reference in New Issue
Block a user