From 9f17771ecd47c3a9f2f594cf3aa90b576ad5eaf0 Mon Sep 17 00:00:00 2001 From: sirlandalf Date: Sat, 27 Jun 2015 04:20:32 +0200 Subject: [PATCH 1/2] fixes --- updates.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updates.go b/updates.go index a5168fa..8678238 100644 --- a/updates.go +++ b/updates.go @@ -12,11 +12,11 @@ func (bot *BotAPI) UpdatesChan(config UpdateConfig) (chan Update, error) { } for _, update := range updates { - if update.UpdateID > config.Offset { + if update.UpdateID >= config.Offset { config.Offset = update.UpdateID + 1 + bot.Updates <- update } - bot.Updates <- update } } }() From 4944eed2fa2574362fa4133aeebc39df8b10f77a Mon Sep 17 00:00:00 2001 From: sirlandalf Date: Sat, 27 Jun 2015 04:24:52 +0200 Subject: [PATCH 2/2] one useless line removed --- updates.go | 1 - 1 file changed, 1 deletion(-) diff --git a/updates.go b/updates.go index 8678238..7106201 100644 --- a/updates.go +++ b/updates.go @@ -16,7 +16,6 @@ func (bot *BotAPI) UpdatesChan(config UpdateConfig) (chan Update, error) { config.Offset = update.UpdateID + 1 bot.Updates <- update } - } } }()