Few bug fixes
Raul Santos raulsntos@gmail.com
Mon, 27 Jul 2015 00:22:10 +0200
2 files changed,
3 insertions(+),
3 deletions(-)
M
bot.go
→
bot.go
@@ -14,14 +14,14 @@ }
// NewBotAPI creates a new BotAPI instance. // Requires a token, provided by @BotFather on Telegram -func NewBotAPI(token string, client http.Client) (*BotAPI, error) { +func NewBotAPI(token string, client *http.Client) (*BotAPI, error) { if client == nil { client = &http.Client{} } bot := &BotAPI{ Token: token, - Client: client, + Client: *client, } self, err := bot.GetMe()
M
methods.go
→
methods.go
@@ -190,7 +190,7 @@ }
w.Close() - req, err := bot.Client.NewRequest("POST", "https://api.telegram.org/bot"+bot.Token+"/"+endpoint, &b) + req, err := http.NewRequest("POST", "https://api.telegram.org/bot"+bot.Token+"/"+endpoint, &b) if err != nil { return APIResponse{}, err }