commit
9c399358c9
1
bot.go
1
bot.go
|
@ -526,6 +526,7 @@ func (bot *BotAPI) ListenForWebhook(pattern string) UpdatesChannel {
|
||||||
|
|
||||||
http.HandleFunc(pattern, func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc(pattern, func(w http.ResponseWriter, r *http.Request) {
|
||||||
bytes, _ := ioutil.ReadAll(r.Body)
|
bytes, _ := ioutil.ReadAll(r.Body)
|
||||||
|
r.Body.Close()
|
||||||
|
|
||||||
var update Update
|
var update Update
|
||||||
json.Unmarshal(bytes, &update)
|
json.Unmarshal(bytes, &update)
|
||||||
|
|
Loading…
Reference in New Issue