From 4565419463c8aa1c89c4b28413487051f997a295 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Fri, 14 Sep 2018 00:26:21 +0300 Subject: [PATCH] fix markdown --- src/routing.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/routing.go b/src/routing.go index 89265d7..046cd74 100644 --- a/src/routing.go +++ b/src/routing.go @@ -513,7 +513,7 @@ func mgWebhookHandler(c *gin.Context) { mb += msg.Data.Product.Img } } else if msg.Data.Type == v1.MsgTypeOrder { - mb = "**Заказ" + mb = "Заказ" if msg.Data.Order.Number != "" { mb += " " + msg.Data.Order.Number @@ -523,7 +523,7 @@ func mgWebhookHandler(c *gin.Context) { mb += fmt.Sprintf(" (%s)", msg.Data.Order.Date) } - mb += "**\n" + mb += "\n" if len(msg.Data.Order.Items) > 0 { for _, v := range msg.Data.Order.Items { mb += fmt.Sprintf("%s %v x %v %s\n", v.Name, v.Quantity.Value, v.Price.Value, currency[strings.ToLower(v.Price.Currency)]) @@ -536,10 +536,6 @@ func mgWebhookHandler(c *gin.Context) { } m := tgbotapi.NewMessage(cid, mb) - if msg.Data.Type == v1.MsgTypeProduct || msg.Data.Type == v1.MsgTypeOrder { - m.ParseMode = "Markdown" - } - if msg.Data.QuoteExternalID != "" { qid, err := strconv.Atoi(msg.Data.QuoteExternalID) if err != nil {