telegram-bot 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/telegram/bot/updates_poller.rb +5 -3
- data/lib/telegram/bot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d594181f45263c89878672c38ab96ca93f94d438
|
4
|
+
data.tar.gz: da24b6e674c33166608c756731775a7f38ad57cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 575c620d5ce534969b8f23b1c44bcfab81fc36d99e3804216b4ad7ad4438fe2c92116159dcc76bdab152fbc4db66ae69a8bb3e3205ebe7b038255711d69627ad
|
7
|
+
data.tar.gz: b8a73a25b7d49b60ad64a6d1cb19c9a4fe1e896f47a394d5175e7a374f0b79488f16410f2c68240ed8a7a08ade6c25a5c672b82e142d7cdddf3f7cb0abf90dbc
|
data/CHANGELOG.md
CHANGED
@@ -65,14 +65,16 @@ module Telegram
|
|
65
65
|
|
66
66
|
def fetch_updates
|
67
67
|
response = bot.async(false) { bot.get_updates(offset: offset, timeout: timeout) }
|
68
|
-
|
68
|
+
updates = response.is_a?(Array) ? response : response['result']
|
69
|
+
return unless updates && updates.any?
|
69
70
|
reload! do
|
70
|
-
|
71
|
+
updates.each do |update|
|
71
72
|
@offset = update['update_id'] + 1
|
72
73
|
yield update
|
73
74
|
end
|
74
75
|
end
|
75
|
-
rescue Timeout::Error
|
76
|
+
rescue Timeout::Error
|
77
|
+
log { 'Fetch timeout' }
|
76
78
|
end
|
77
79
|
|
78
80
|
def reload!
|
data/lib/telegram/bot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telegram-bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Melentiev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|