From 4ab823219083335caf091bf35f9f7ca2a2f8c02c Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Thu, 6 Dec 2018 15:33:46 +0300 Subject: [PATCH 1/8] add max chars count in channel settings --- go.mod | 2 +- go.sum | 2 ++ src/main.go | 1 + src/routing.go | 9 +++++---- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 443393c..3fe6a75 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/pkg/errors v0.8.0 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/retailcrm/api-client-go v1.1.0 - github.com/retailcrm/mg-transport-api-client-go v1.1.17 + github.com/retailcrm/mg-transport-api-client-go v1.1.18 github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf // indirect github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 // indirect diff --git a/go.sum b/go.sum index 3d741a8..f1857ba 100644 --- a/go.sum +++ b/go.sum @@ -97,6 +97,8 @@ github.com/retailcrm/api-client-go v1.1.0 h1:APPO6ccJAeMV7Jz7BhrtDKSOm2r1j5Ft6fu github.com/retailcrm/api-client-go v1.1.0/go.mod h1:QRoPE2SM6ST7i2g0yEdqm7Iw98y7cYuq3q14Ot+6N8c= github.com/retailcrm/mg-transport-api-client-go v1.1.17 h1:8L0meFJFZwr3TyiF/xypI+g0xRXIGkWhyQ6qiCfojqw= github.com/retailcrm/mg-transport-api-client-go v1.1.17/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= +github.com/retailcrm/mg-transport-api-client-go v1.1.18 h1:V59Ai79N1jrS1kAnQggNoRYsoAdr2RUV7Hf0xbw9r9Q= +github.com/retailcrm/mg-transport-api-client-go v1.1.18/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN6Usn4jy8unvggSJz/NC790tefw8Zdy6OZS5co= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo= diff --git a/src/main.go b/src/main.go index 35e8319..1a1ee8d 100644 --- a/src/main.go +++ b/src/main.go @@ -15,6 +15,7 @@ type Options struct { } const Type = "telegram" +const MaxCharsCount = 4096 var ( config *TransportConfig diff --git a/src/routing.go b/src/routing.go index 372b941..fea45a5 100644 --- a/src/routing.go +++ b/src/routing.go @@ -330,10 +330,11 @@ func getChannelSettings(cid ...uint64) v1.Channel { Read: v1.ChannelFeatureNone, }, Text: v1.ChannelSettingsText{ - Creating: v1.ChannelFeatureBoth, - Editing: v1.ChannelFeatureBoth, - Quoting: v1.ChannelFeatureBoth, - Deleting: v1.ChannelFeatureReceive, + Creating: v1.ChannelFeatureBoth, + Editing: v1.ChannelFeatureBoth, + Quoting: v1.ChannelFeatureBoth, + Deleting: v1.ChannelFeatureReceive, + MaxCharsCount: MaxCharsCount, }, Product: v1.Product{ Creating: v1.ChannelFeatureReceive, From 3f826f7bd5f794f8735eb3e85960557f78bdbfff Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Thu, 6 Dec 2018 16:01:06 +0300 Subject: [PATCH 2/8] fix test --- src/main.go | 2 +- src/routing_test.go | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.go b/src/main.go index 1a1ee8d..347dd3e 100644 --- a/src/main.go +++ b/src/main.go @@ -15,7 +15,7 @@ type Options struct { } const Type = "telegram" -const MaxCharsCount = 4096 +const MaxCharsCount uint16 = 4096 var ( config *TransportConfig diff --git a/src/routing_test.go b/src/routing_test.go index 2504e8c..c7b1a41 100644 --- a/src/routing_test.go +++ b/src/routing_test.go @@ -66,10 +66,11 @@ func TestRouting_addBotHandler(t *testing.T) { Read: v1.ChannelFeatureNone, }, Text: v1.ChannelSettingsText{ - Creating: v1.ChannelFeatureBoth, - Editing: v1.ChannelFeatureBoth, - Quoting: v1.ChannelFeatureBoth, - Deleting: v1.ChannelFeatureReceive, + Creating: v1.ChannelFeatureBoth, + Editing: v1.ChannelFeatureBoth, + Quoting: v1.ChannelFeatureBoth, + Deleting: v1.ChannelFeatureReceive, + MaxCharsCount: MaxCharsCount, }, Product: v1.Product{ Creating: v1.ChannelFeatureReceive, From f4704f665236b86b4725f947154bac6daee9790a Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Tue, 11 Dec 2018 16:45:42 +0300 Subject: [PATCH 3/8] add channel configuration update --- go.sum | 2 -- src/routing.go | 15 +++++++++++++++ src/routing_test.go | 45 +++------------------------------------------ 3 files changed, 18 insertions(+), 44 deletions(-) diff --git a/go.sum b/go.sum index f1857ba..8bed425 100644 --- a/go.sum +++ b/go.sum @@ -95,8 +95,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/retailcrm/api-client-go v1.1.0 h1:APPO6ccJAeMV7Jz7BhrtDKSOm2r1j5Ft6fuEXNP2ij4= github.com/retailcrm/api-client-go v1.1.0/go.mod h1:QRoPE2SM6ST7i2g0yEdqm7Iw98y7cYuq3q14Ot+6N8c= -github.com/retailcrm/mg-transport-api-client-go v1.1.17 h1:8L0meFJFZwr3TyiF/xypI+g0xRXIGkWhyQ6qiCfojqw= -github.com/retailcrm/mg-transport-api-client-go v1.1.17/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= github.com/retailcrm/mg-transport-api-client-go v1.1.18 h1:V59Ai79N1jrS1kAnQggNoRYsoAdr2RUV7Hf0xbw9r9Q= github.com/retailcrm/mg-transport-api-client-go v1.1.18/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN6Usn4jy8unvggSJz/NC790tefw8Zdy6OZS5co= diff --git a/src/routing.go b/src/routing.go index fea45a5..723179c 100644 --- a/src/routing.go +++ b/src/routing.go @@ -75,6 +75,14 @@ func addBotHandler(c *gin.Context) { } b.Channel = data.ChannelID + b.Lang = "en" + + hashSettings, err := getChannelSettingsHash() + if err != nil { + logger.Errorf("addBotHandler hashSettings apiURl: %s, err: %s", conn.APIURL, err.Error()) + } else { + b.ChannelSettingsHash = hashSettings + } err = conn.createBot(b) if err != nil { @@ -253,6 +261,13 @@ func activityHandler(c *gin.Context) { conn.APIURL = systemUrl } + hashSettings, err := getChannelSettingsHash() + if err != nil { + logger.Errorf("activityHandler hashSettings apiURl: %s, err: %s", conn.APIURL, err.Error()) + } else { + updateBots(conn, hashSettings) + } + if err := conn.saveConnection(); err != nil { c.Error(err) return diff --git a/src/routing_test.go b/src/routing_test.go index c7b1a41..79b5aa7 100644 --- a/src/routing_test.go +++ b/src/routing_test.go @@ -13,12 +13,12 @@ import ( "github.com/gin-gonic/gin" "github.com/h2non/gock" - "github.com/retailcrm/mg-transport-api-client-go/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var router *gin.Engine +var ch = getChannelSettings() func init() { os.Chdir("../") @@ -56,48 +56,9 @@ func TestRouting_connectHandler(t *testing.T) { func TestRouting_addBotHandler(t *testing.T) { defer gock.Off() - ch := v1.Channel{ - Type: "telegram", - Name: "@TestBot", - Settings: v1.ChannelSettings{ - SpamAllowed: false, - Status: v1.Status{ - Delivered: v1.ChannelFeatureSend, - Read: v1.ChannelFeatureNone, - }, - Text: v1.ChannelSettingsText{ - Creating: v1.ChannelFeatureBoth, - Editing: v1.ChannelFeatureBoth, - Quoting: v1.ChannelFeatureBoth, - Deleting: v1.ChannelFeatureReceive, - MaxCharsCount: MaxCharsCount, - }, - Product: v1.Product{ - Creating: v1.ChannelFeatureReceive, - Editing: v1.ChannelFeatureReceive, - }, - Order: v1.Order{ - Creating: v1.ChannelFeatureReceive, - Editing: v1.ChannelFeatureReceive, - }, - File: v1.ChannelSettingsFilesBase{ - Creating: v1.ChannelFeatureBoth, - Editing: v1.ChannelFeatureBoth, - Quoting: v1.ChannelFeatureBoth, - Deleting: v1.ChannelFeatureReceive, - Max: 1, - }, - Image: v1.ChannelSettingsFilesBase{ - Creating: v1.ChannelFeatureBoth, - Editing: v1.ChannelFeatureBoth, - Quoting: v1.ChannelFeatureBoth, - Deleting: v1.ChannelFeatureReceive, - Max: 10, - }, - }, - } + ch.Name = "@TestBot" - outgoing, _ := json.Marshal(&ch) + outgoing, _ := json.Marshal(ch) p := url.Values{"url": {"https://" + config.HTTPServer.Host + "/telegram/123123:Qwerty"}} gock.New("https://api.telegram.org"). From 8e094d408a18dd73999fe8240bf37d7498fc3ca0 Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Thu, 13 Dec 2018 17:31:49 +0300 Subject: [PATCH 4/8] add convert sticker --- go.mod | 3 ++- go.sum | 6 +++-- src/routing.go | 62 ++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 61 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 3fe6a75..d9ad56c 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/pkg/errors v0.8.0 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/retailcrm/api-client-go v1.1.0 - github.com/retailcrm/mg-transport-api-client-go v1.1.18 + github.com/retailcrm/mg-transport-api-client-go v1.1.19 github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf // indirect github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 // indirect @@ -53,6 +53,7 @@ require ( github.com/technoweenie/multipartstreamer v1.0.1 // indirect github.com/ugorji/go v1.1.1 // indirect golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b // indirect + golang.org/x/image v0.0.0-20181116024801-cd38e8056d9b golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3 // indirect golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e // indirect diff --git a/go.sum b/go.sum index 8bed425..3b54250 100644 --- a/go.sum +++ b/go.sum @@ -95,8 +95,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/retailcrm/api-client-go v1.1.0 h1:APPO6ccJAeMV7Jz7BhrtDKSOm2r1j5Ft6fuEXNP2ij4= github.com/retailcrm/api-client-go v1.1.0/go.mod h1:QRoPE2SM6ST7i2g0yEdqm7Iw98y7cYuq3q14Ot+6N8c= -github.com/retailcrm/mg-transport-api-client-go v1.1.18 h1:V59Ai79N1jrS1kAnQggNoRYsoAdr2RUV7Hf0xbw9r9Q= -github.com/retailcrm/mg-transport-api-client-go v1.1.18/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= +github.com/retailcrm/mg-transport-api-client-go v1.1.19 h1:bq4kyqcdWjeqQmgTgv99A9YvItpz4N6rKkdbZ66bNdU= +github.com/retailcrm/mg-transport-api-client-go v1.1.19/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN6Usn4jy8unvggSJz/NC790tefw8Zdy6OZS5co= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo= @@ -111,6 +111,8 @@ github.com/ugorji/go v1.1.1 h1:gmervu+jDMvXTbcHQ0pd2wee85nEoE0BsVyEuzkfK8w= github.com/ugorji/go v1.1.1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b h1:2b9XGzhjiYsYPnKXoEfL7klWZQIt8IfyRCz62gCqqlQ= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/image v0.0.0-20181116024801-cd38e8056d9b h1:VHyIDlv3XkfCa5/a81uzaoDkHH4rr81Z62g+xlnO8uM= +golang.org/x/image v0.0.0-20181116024801-cd38e8056d9b/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3 h1:czFLhve3vsQetD6JOJ8NZZvGQIXlnN3/yXxbT6/awxI= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= diff --git a/src/routing.go b/src/routing.go index 723179c..cb06dca 100644 --- a/src/routing.go +++ b/src/routing.go @@ -3,6 +3,8 @@ package main import ( "encoding/json" "fmt" + "image/png" + "io" "net/http" "strconv" "strings" @@ -12,6 +14,7 @@ import ( "github.com/go-telegram-bot-api/telegram-bot-api" "github.com/retailcrm/api-client-go/v5" "github.com/retailcrm/mg-transport-api-client-go/v1" + "golang.org/x/image/webp" ) func connectHandler(c *gin.Context) { @@ -974,13 +977,25 @@ func setAttachment(attachments *tgbotapi.Message, client *v1.MgClient, snd *v1.S return err } - item, _, err := getItemData( - client, - fmt.Sprintf("https://api.telegram.org/file/bot%s/%s", botToken, file.FilePath), - caption, - ) - if err != nil { - return err + item := v1.Item{} + fileUrl := fmt.Sprintf("https://api.telegram.org/file/bot%s/%s", botToken, file.FilePath) + if t != "sticker" { + item, _, err = getItemData( + client, + fileUrl, + caption, + ) + if err != nil { + return err + } + } else { + item, err = convertAndUploadImage( + client, + fileUrl, + ) + if err != nil { + return err + } } items = append(items, item) @@ -1014,3 +1029,36 @@ func getItemData(client *v1.MgClient, url string, caption string) (v1.Item, int, func getFileURL(fileID string, b *tgbotapi.BotAPI) (tgbotapi.File, error) { return b.GetFile(tgbotapi.FileConfig{FileID: fileID}) } + +func convertAndUploadImage(client *v1.MgClient, url string) (v1.Item, error) { + item := v1.Item{} + + res, err := http.Get(url) + if err != nil { + return item, err + } + + img, err := webp.Decode(res.Body) + if err != nil { + return item, err + } + + pReader, pWriter := io.Pipe() + + go func() { + defer pWriter.Close() + err = png.Encode(pWriter, img) + if err != nil { + logger.Info(item, err.Error()) + } + }() + + data, _, err := client.UploadFile(pReader) + if err != nil { + return item, err + } + + item.ID = data.ID + + return item, nil +} From 2dcbdad9c8e14351d511a6118bc5e59367f88b96 Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Mon, 17 Dec 2018 16:56:42 +0300 Subject: [PATCH 5/8] update mg-transport-api-client-go --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d9ad56c..15cdffe 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/pkg/errors v0.8.0 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/retailcrm/api-client-go v1.1.0 - github.com/retailcrm/mg-transport-api-client-go v1.1.19 + github.com/retailcrm/mg-transport-api-client-go v1.1.20 github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf // indirect github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 // indirect diff --git a/go.sum b/go.sum index 3b54250..3f9ec7f 100644 --- a/go.sum +++ b/go.sum @@ -95,8 +95,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/retailcrm/api-client-go v1.1.0 h1:APPO6ccJAeMV7Jz7BhrtDKSOm2r1j5Ft6fuEXNP2ij4= github.com/retailcrm/api-client-go v1.1.0/go.mod h1:QRoPE2SM6ST7i2g0yEdqm7Iw98y7cYuq3q14Ot+6N8c= -github.com/retailcrm/mg-transport-api-client-go v1.1.19 h1:bq4kyqcdWjeqQmgTgv99A9YvItpz4N6rKkdbZ66bNdU= -github.com/retailcrm/mg-transport-api-client-go v1.1.19/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= +github.com/retailcrm/mg-transport-api-client-go v1.1.20 h1:1aDJ2QVtSkMtSUm50exmzQFSsE+/FQiWYdw2pamUyLc= +github.com/retailcrm/mg-transport-api-client-go v1.1.20/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN6Usn4jy8unvggSJz/NC790tefw8Zdy6OZS5co= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo= From 284f2e564329c74de23270e91e4453b5e011156f Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Thu, 20 Dec 2018 15:02:10 +0300 Subject: [PATCH 6/8] update golang in docker-compose --- docker-compose-test.yml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-test.yml b/docker-compose-test.yml index cf789fc..5b7b322 100644 --- a/docker-compose-test.yml +++ b/docker-compose-test.yml @@ -11,7 +11,7 @@ services: - ${POSTGRES_ADDRESS:-127.0.0.1:5434}:${POSTGRES_PORT:-5432} mg_telegram_test: - image: golang:1.11-stretch + image: golang:1.11.3-stretch working_dir: /mgtg user: ${UID:-1000}:${GID:-1000} environment: diff --git a/docker-compose.yml b/docker-compose.yml index a31ed0e..edc9a6c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - ${POSTGRES_ADDRESS:-127.0.0.1:5434}:${POSTGRES_PORT:-5432} mg_telegram: - image: golang:1.11-stretch + image: golang:1.11.3-stretch working_dir: /mgtg user: ${UID:-1000}:${GID:-1000} environment: From 9db7c61359e8647576c2c7801eb80ad3d524d725 Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Thu, 20 Dec 2018 15:03:18 +0300 Subject: [PATCH 7/8] fix error with quote message --- src/routing.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/routing.go b/src/routing.go index cb06dca..a1433a6 100644 --- a/src/routing.go +++ b/src/routing.go @@ -552,7 +552,13 @@ func telegramWebhookHandler(c *gin.Context) { data, st, err := client.Messages(snd) if err != nil { logger.Error(b.Token, err.Error(), st, data) - c.Error(err) + + if update.Message.ReplyToMessage != nil { + c.AbortWithStatus(http.StatusOK) + } else { + c.Error(err) + } + return } From 7301fe54c2fe15524cef4e34ccbf6ed5a351716a Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Thu, 20 Dec 2018 16:10:27 +0300 Subject: [PATCH 8/8] update mg-transport-api-client-go --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 15cdffe..368c42f 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/pkg/errors v0.8.0 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/retailcrm/api-client-go v1.1.0 - github.com/retailcrm/mg-transport-api-client-go v1.1.20 + github.com/retailcrm/mg-transport-api-client-go v1.1.21 github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf // indirect github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 // indirect diff --git a/go.sum b/go.sum index 3f9ec7f..605f1cd 100644 --- a/go.sum +++ b/go.sum @@ -97,6 +97,8 @@ github.com/retailcrm/api-client-go v1.1.0 h1:APPO6ccJAeMV7Jz7BhrtDKSOm2r1j5Ft6fu github.com/retailcrm/api-client-go v1.1.0/go.mod h1:QRoPE2SM6ST7i2g0yEdqm7Iw98y7cYuq3q14Ot+6N8c= github.com/retailcrm/mg-transport-api-client-go v1.1.20 h1:1aDJ2QVtSkMtSUm50exmzQFSsE+/FQiWYdw2pamUyLc= github.com/retailcrm/mg-transport-api-client-go v1.1.20/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= +github.com/retailcrm/mg-transport-api-client-go v1.1.21 h1:OKkey9uvB16ucICuO2hp/tfh0wfp3na0CxRiT2Iv3sE= +github.com/retailcrm/mg-transport-api-client-go v1.1.21/go.mod h1:AWV6BueE28/6SCoyfKURTo4lF0oXYoOKmHTzehd5vAI= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN6Usn4jy8unvggSJz/NC790tefw8Zdy6OZS5co= github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo=