api: always specify allowed_updates in getUpdates

v3.1.3
Demian 1 year ago
parent ad84cbde5a
commit e3c38d400f

@ -217,13 +217,12 @@ func (b *Bot) getUpdates(offset, limit int, timeout time.Duration, allowed []str
"timeout": strconv.Itoa(int(timeout / time.Second)),
}
data, _ := json.Marshal(allowed)
params["allowed_updates"] = string(data)
if limit != 0 {
params["limit"] = strconv.Itoa(limit)
}
if len(allowed) > 0 {
data, _ := json.Marshal(allowed)
params["allowed_updates"] = string(data)
}
data, err := b.Raw("getUpdates", params)
if err != nil {

Loading…
Cancel
Save