rubydium 0.4.3 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubydium/bot.rb +7 -5
- data/lib/rubydium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8da88df665a4644af494bc3cf0ed13935eeebb2db8d71b927ff2f3e818d1ba0
|
4
|
+
data.tar.gz: b46f168ef41864b9dc416ee0544c7f2262c8c26c19e705594345349335539cc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 076e2ec42fbeec569de244888faf4efdbc4b9d6a9ae3c5090465bed009893f7a6dd027290e2192fceda26d1fdb512ccba392c5743cca93825efbbbab95fb31cf
|
7
|
+
data.tar.gz: ee7d987228212a34667a3954abd32332fbb51d45844f3ee81e1008ac18c054003eddf2736f47ab1b60eac5afd7d55af5e3b76787b0c267370a60385e652ad3e4
|
data/lib/rubydium/bot.rb
CHANGED
@@ -25,22 +25,24 @@ module Rubydium
|
|
25
25
|
# Not all `update`s here are messages (`listen` yields `Update#current_message`,
|
26
26
|
# which can be `ChatMemberUpdated` etc.)
|
27
27
|
# TODO: rework to allow for clean handling of other types.
|
28
|
-
if update.is_a?(Telegram::Bot::Types::Message) || update.is_a?(Telegram::Bot::Types::
|
28
|
+
if update.is_a?(Telegram::Bot::Types::Message) || update.is_a?(Telegram::Bot::Types::CallbackQuery)
|
29
29
|
new(client, update).handle_update
|
30
30
|
end
|
31
|
-
rescue StandardError => e
|
32
|
-
puts e.detailed_message, e.backtrace
|
33
31
|
end
|
32
|
+
rescue StandardError => e
|
33
|
+
puts e.detailed_message, e.backtrace
|
34
|
+
retry
|
34
35
|
end
|
35
36
|
end
|
36
37
|
end
|
37
38
|
end
|
38
39
|
|
39
40
|
def initialize(client, update)
|
41
|
+
@update = update
|
40
42
|
@client = client
|
41
43
|
@api = client.api
|
42
|
-
@msg = update
|
43
|
-
@user =
|
44
|
+
@msg = update.is_a?(Telegram::Bot::Types::Message) ? update : update.message
|
45
|
+
@user = update.from
|
44
46
|
@chat = @msg.chat
|
45
47
|
@topic_id = @msg.message_thread_id if @chat.is_forum
|
46
48
|
@replies_to = @msg.reply_to_message unless @msg.reply_to_message&.message_id == @topic_id
|
data/lib/rubydium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubydium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bulgakke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: telegram-bot-ruby
|