From e62ff4e8958a23a90777c7015a1d10a05ce956cd Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Tue, 20 Nov 2018 12:19:04 +0300 Subject: [PATCH] replace markdown symbols in messages --- src/routing.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routing.go b/src/routing.go index 1d321b7..6a9cde1 100644 --- a/src/routing.go +++ b/src/routing.go @@ -615,7 +615,7 @@ func mgWebhookHandler(c *gin.Context) { case v1.MsgTypeOrder: mb = getOrderMessage(msg.Data.Order) case v1.MsgTypeText: - mb = msg.Data.Content + mb = replaceMarkdownSymbols(msg.Data.Content) } m := tgbotapi.NewMessage(cid, mb) @@ -644,7 +644,7 @@ func mgWebhookHandler(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"external_message_id": strconv.Itoa(msgSend.MessageID)}) case "message_updated": - msgSend, err := bot.Send(tgbotapi.NewEditMessageText(cid, uid, msg.Data.Content)) + msgSend, err := bot.Send(tgbotapi.NewEditMessageText(cid, uid, replaceMarkdownSymbols(msg.Data.Content))) if err != nil { logger.Error(err) c.AbortWithStatus(http.StatusBadRequest)