rubydium 0.3.1 → 0.3.3
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 +2 -2
- data/lib/rubydium/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a836e00b2a9935f623cd1479c6d89b13762bd4ffde066cef1d04bcfe0cec1e1
|
4
|
+
data.tar.gz: 2b9748c9038fcf520d5b7ca4459c286a0f84b5e0b00b21fe9ca7ce4fdfc7e233
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0a6519c38a520142f004e4c9efe3d8512cfee374458de26a26d05a4188833f0e2e6edaa27302d4275ea6419fc15052a8bf8d6297ef86c7aed2e944cc0ee174a
|
7
|
+
data.tar.gz: 30611da79633ed8a061b9e906c4fd4e9e9a34c8232dbb58c4cfd1706855f7fbb72ee5530fcebb2035215455e5b53c085afdbb7f995fd8c42a340f69414aac4ad
|
data/lib/rubydium/bot.rb
CHANGED
@@ -42,7 +42,8 @@ module Rubydium
|
|
42
42
|
@msg = update
|
43
43
|
@user = @msg.from
|
44
44
|
@chat = @msg.chat
|
45
|
-
@
|
45
|
+
@topic_id = @msg.message_thread_id if @chat.is_forum
|
46
|
+
@replies_to = @msg.reply_to_message unless @msg.reply_to_message&.message_id == @topic_id
|
46
47
|
@target = @replies_to&.from
|
47
48
|
@text = @msg.text.to_s
|
48
49
|
@message_id = @msg.message_id
|
@@ -50,7 +51,6 @@ module Rubydium
|
|
50
51
|
@text_without_command = @text.gsub(@command.to_s, "").gsub(/@#{config.bot_username}\b/,
|
51
52
|
"").strip
|
52
53
|
@text_without_bot_mentions = @text.gsub(/@#{config.bot_username}\b/, "")
|
53
|
-
@topic_id = @msg.message_thread_id if @chat.is_forum
|
54
54
|
end
|
55
55
|
|
56
56
|
def handle_update
|
data/lib/rubydium/version.rb
CHANGED