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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71aa370cbe3fa625308d85852bf156ff4bb3c1d263b9e965dd8ae381c6f97b40
4
- data.tar.gz: 3d9fec8f5e34b8fb9074a596167e6aa3306ecd4ba908b23d7898fdd25277fe45
3
+ metadata.gz: 4a836e00b2a9935f623cd1479c6d89b13762bd4ffde066cef1d04bcfe0cec1e1
4
+ data.tar.gz: 2b9748c9038fcf520d5b7ca4459c286a0f84b5e0b00b21fe9ca7ce4fdfc7e233
5
5
  SHA512:
6
- metadata.gz: afcaf39f388f5f94b5f79c8ed0f1daba65f011a260156c7455f6200989049102dec3331a23eccf8e01dd28576ebb57f3cc11708ebd699025d749ce9c3a6b2188
7
- data.tar.gz: 2155285580e0f8f8752f56cdb6fa133f434f54bf06f5717897378897fba98c4ff0555e6be31c673832a72d99f4765639857724480cbc094ac6d0d8cec01b561e
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
- @replies_to = @msg.reply_to_message
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubydium
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubydium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - bulgakke