From 16411c93750356daf9a19d8cd8975e50e3f3b470 Mon Sep 17 00:00:00 2001 From: Umputun Date: Fri, 26 Oct 2018 12:55:30 -0500 Subject: [PATCH] unescape tg message --- backend/app/notify/telegram.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/app/notify/telegram.go b/backend/app/notify/telegram.go index 461f88bc..ecaa0d92 100644 --- a/backend/app/notify/telegram.go +++ b/backend/app/notify/telegram.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "html" "log" "net/http" "strings" @@ -81,6 +82,7 @@ func (t *Telegram) Send(ctx context.Context, req request) error { from = "*" + from + "*" link := fmt.Sprintf("↦ [original comment](%s)", req.comment.Locator.URL+uiNav+req.comment.ID) msg := fmt.Sprintf("%s\n\n%s\n\n%s", from, req.comment.Orig, link) + msg = html.UnescapeString(msg) u := fmt.Sprintf("%s%s/sendMessage?chat_id=@%s&parse_mode=Markdown&disable_web_page_preview=true", t.apiPrefix, t.token, t.channelName)