Allow negative Offset values for GetUpdates, closes #51.
parent
13f31854a2
commit
1daed40422
2
bot.go
2
bot.go
|
@ -364,7 +364,7 @@ func (bot *BotAPI) GetFile(config FileConfig) (File, error) {
|
||||||
// instantly instead of having to wait between requests.
|
// instantly instead of having to wait between requests.
|
||||||
func (bot *BotAPI) GetUpdates(config UpdateConfig) ([]Update, error) {
|
func (bot *BotAPI) GetUpdates(config UpdateConfig) ([]Update, error) {
|
||||||
v := url.Values{}
|
v := url.Values{}
|
||||||
if config.Offset > 0 {
|
if config.Offset != 0 {
|
||||||
v.Add("offset", strconv.Itoa(config.Offset))
|
v.Add("offset", strconv.Itoa(config.Offset))
|
||||||
}
|
}
|
||||||
if config.Limit > 0 {
|
if config.Limit > 0 {
|
||||||
|
|
Loading…
Reference in New Issue