From 0ab71de95d0190b48ae1b840a51cb404414cf87a Mon Sep 17 00:00:00 2001 From: Umputun Date: Thu, 25 Oct 2018 12:48:23 -0500 Subject: [PATCH] unicode arrow for tg from->to --- backend/app/notify/telegram.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/notify/telegram.go b/backend/app/notify/telegram.go index 918572e1..ae4c3b33 100644 --- a/backend/app/notify/telegram.go +++ b/backend/app/notify/telegram.go @@ -77,10 +77,10 @@ func (t *Telegram) Send(ctx context.Context, req request) error { log.Printf("[DEBUG] send telegram notification to %s, comment id %s", t.channelName, req.comment.ID) from := req.comment.User.Name if req.comment.ParentID != "" { - from += " -> " + req.parent.User.Name + from += " ➜ " + req.parent.User.Name } from = "*" + from + "*" - link := fmt.Sprintf("[comment](%s)", req.comment.Locator.URL+uiNav+req.comment.ID) + link := fmt.Sprintf(" [orginal 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 = strings.Replace(msg, `”`, `"`, -1) // telegram doesn't like quotes ” and shows them as " u := fmt.Sprintf("%s%s/sendMessage?chat_id=@%s&text=%s&parse_mode=Markdown&disable_web_page_preview=true",