summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bridge/telegram/handlers.go3
-rw-r--r--bridge/telegram/telegram.go5
2 files changed, 8 insertions, 0 deletions
diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go
index f73c8b0f..5c60f74b 100644
--- a/bridge/telegram/handlers.go
+++ b/bridge/telegram/handlers.go
@@ -322,6 +322,9 @@ func (b *Btelegram) handleEdit(msg *config.Message, chatid int64) (string, error
case "Markdown":
b.Log.Debug("Using mode markdown")
m.ParseMode = tgbotapi.ModeMarkdown
+ case MarkdownV2:
+ b.Log.Debug("Using mode MarkdownV2")
+ m.ParseMode = MarkdownV2
}
if strings.ToLower(b.GetString("MessageFormat")) == HTMLNick {
b.Log.Debug("Using mode HTML - nick only")
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go
index ac45985e..29f2f291 100644
--- a/bridge/telegram/telegram.go
+++ b/bridge/telegram/telegram.go
@@ -15,6 +15,7 @@ const (
unknownUser = "unknown"
HTMLFormat = "HTML"
HTMLNick = "htmlnick"
+ MarkdownV2 = "MarkdownV2"
)
type Btelegram struct {
@@ -126,6 +127,10 @@ func (b *Btelegram) sendMessage(chatid int64, username, text string) (string, er
b.Log.Debug("Using mode markdown")
m.ParseMode = tgbotapi.ModeMarkdown
}
+ if b.GetString("MessageFormat") == MarkdownV2 {
+ b.Log.Debug("Using mode MarkdownV2")
+ m.ParseMode = MarkdownV2
+ }
if strings.ToLower(b.GetString("MessageFormat")) == HTMLNick {
b.Log.Debug("Using mode HTML - nick only")
m.Text = username + html.EscapeString(text)