From a7b0a4bbf62500c6a2501af252f8fa0f199fb7fe Mon Sep 17 00:00:00 2001 From: Umputun Date: Wed, 24 Oct 2018 22:47:00 -0500 Subject: [PATCH] disable_web_page_preview for telegram notif --- backend/app/notify/telegram.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/app/notify/telegram.go b/backend/app/notify/telegram.go index 54160581..3b5d0dcf 100644 --- a/backend/app/notify/telegram.go +++ b/backend/app/notify/telegram.go @@ -81,10 +81,11 @@ func (t *Telegram) Send(ctx context.Context, req request) error { } 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.Text, link) + msg := fmt.Sprintf("%s\n\n%s\n\n%s", from, req.comment.Orig, link) - r, err := http.NewRequest("GET", fmt.Sprintf("%s%s/sendMessage?chat_id=@%s&text=%s&parse_mode=Markdown", - t.apiPrefix, t.token, t.channelName, url.QueryEscape(msg)), nil) + u := fmt.Sprintf("%s%s/sendMessage?chat_id=@%s&text=%s&parse_mode=Markdown&disable_web_page_preview=false", + t.apiPrefix, t.token, t.channelName, url.QueryEscape(msg)) + r, err := http.NewRequest("GET", u, nil) if err != nil { return errors.Wrap(err, "failed to make telegram request") }