unicode arrow for tg from->to

This commit is contained in:
Umputun
2018-10-25 12:48:23 -05:00
parent 7db2959eb1
commit 0ab71de95d
+2 -2
View File
@@ -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",