From 1ba9536622e98f3b88a559d3d17c2397686f7776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thilo=20Karra=C3=9F?= Date: Wed, 28 Oct 2020 15:19:51 +0100 Subject: [PATCH] Set default mode to markdown2 --- telegram/bot.go | 1 + telegram/update.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/telegram/bot.go b/telegram/bot.go index c5b3056..5f6f3dd 100644 --- a/telegram/bot.go +++ b/telegram/bot.go @@ -77,6 +77,7 @@ func (b *Bot) SendMessage(chatid int64, message string, replyto int64) (*Message //call.Param(prm) call.Parameters["chat_id"] = fmt.Sprintf("%v", chatid) call.Parameters["text"] = message + call.Parameters["parse_mode"] = "MarkdownV2" ret := &MessageResponse{} err := call.Fire(context.Background(), ret) if !err.Ok() { diff --git a/telegram/update.go b/telegram/update.go index 7d2d108..7a2fa8b 100644 --- a/telegram/update.go +++ b/telegram/update.go @@ -35,7 +35,7 @@ func (b *Bot) ShortPoll(ctx context.Context, interval int) { } } -// Serve the Update channel using long polling +// Serve the Update channel using long polling, with a timeout given in seconds func (b *Bot) LongPoll(ctx context.Context, timeout int64) { for { select {