all repos — telegram-bot-api @ 6b5102fab5586322d6fe98112fc671ad23dfae33

Golang bindings for the Telegram Bot API

fix debug printing
zhuharev kirill@zhuharev.ru
Tue, 31 Oct 2017 02:34:34 +0300
commit

6b5102fab5586322d6fe98112fc671ad23dfae33

parent

3cfc52c9c2c86b6df6a0b54d25c634abd9487cf4

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M bot.gobot.go

@@ -73,8 +73,9 @@ bytes, err := bot.decodeAPIResponse(resp.Body, &apiResp)

if err != nil { return apiResp, err } + if bot.Debug { - log.Printf("%s %s", endpoint, bytes) + log.Printf("%s resp: %s", endpoint, bytes) } if resp.StatusCode == http.StatusForbidden {

@@ -110,7 +111,7 @@ if err != nil {

return } - return + return data, nil } // makeMessageRequest makes a request to a method that returns a Message.