From f550438236a09d4fa9622c14e9aec09235078f2e Mon Sep 17 00:00:00 2001 From: Umputun Date: Thu, 25 Oct 2018 11:29:55 -0500 Subject: [PATCH] change telegram msg to html --- backend/app/notify/telegram.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/app/notify/telegram.go b/backend/app/notify/telegram.go index 06d900fc..9df6d002 100644 --- a/backend/app/notify/telegram.go +++ b/backend/app/notify/telegram.go @@ -79,11 +79,11 @@ func (t *Telegram) Send(ctx context.Context, req request) error { if req.comment.ParentID != "" { from += " -> " + req.parent.User.Name } - from = "*" + from + "*" - link := fmt.Sprintf("[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) + from = "" + from + "" + link := fmt.Sprintf(`comment`, req.comment.Locator.URL+uiNav+req.comment.ID) + msg := fmt.Sprintf("%s

%s

%s", from, req.comment.Text, link) - u := fmt.Sprintf("%s%s/sendMessage?chat_id=@%s&text=%s&parse_mode=Markdown&disable_web_page_preview=true", + u := fmt.Sprintf("%s%s/sendMessage?chat_id=@%s&text=%s&parse_mode=HTML&disable_web_page_preview=true", t.apiPrefix, t.token, t.channelName, url.QueryEscape(msg)) r, err := http.NewRequest("GET", u, nil) if err != nil {