api: always specify allowed_updates in getUpdates

pull/588/head
Demian 1 year ago
parent 8a14d8a96b
commit 92739f1414

@ -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