mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-22 02:32:02 -08:00
Add markdown support (telegram). #355
This commit is contained in:
parent
0bcd1e62f3
commit
d4a47671ea
@ -89,6 +89,9 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
|
|||||||
if b.Config.MessageFormat == "HTML" {
|
if b.Config.MessageFormat == "HTML" {
|
||||||
m.ParseMode = tgbotapi.ModeHTML
|
m.ParseMode = tgbotapi.ModeHTML
|
||||||
}
|
}
|
||||||
|
if b.Config.MessageFormat == "Markdown" {
|
||||||
|
m.ParseMode = tgbotapi.ModeMarkdown
|
||||||
|
}
|
||||||
_, err = b.c.Send(m)
|
_, err = b.c.Send(m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
@ -324,6 +327,9 @@ func (b *Btelegram) sendMessage(chatid int64, text string) (string, error) {
|
|||||||
if b.Config.MessageFormat == "HTML" {
|
if b.Config.MessageFormat == "HTML" {
|
||||||
m.ParseMode = tgbotapi.ModeHTML
|
m.ParseMode = tgbotapi.ModeHTML
|
||||||
}
|
}
|
||||||
|
if b.Config.MessageFormat == "Markdown" {
|
||||||
|
m.ParseMode = tgbotapi.ModeMarkdown
|
||||||
|
}
|
||||||
res, err := b.c.Send(m)
|
res, err := b.c.Send(m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
Loading…
Reference in New Issue
Block a user