rubydium 0.3.1 → 0.3.2

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: '06454492015a165a13f48b512e35f28d01c23d971f2e747a63db539f99a74dba'
4
+ data.tar.gz: 992290fd34805a84438d848067e2281b13d6542e80671160bbf46f8699cdb353
5
5
  SHA512:
6
- metadata.gz: afcaf39f388f5f94b5f79c8ed0f1daba65f011a260156c7455f6200989049102dec3331a23eccf8e01dd28576ebb57f3cc11708ebd699025d749ce9c3a6b2188
7
- data.tar.gz: 2155285580e0f8f8752f56cdb6fa133f434f54bf06f5717897378897fba98c4ff0555e6be31c673832a72d99f4765639857724480cbc094ac6d0d8cec01b561e
6
+ metadata.gz: ce02e7b72e9459d4fa11deb91a26a40e8987831e6169019f5c6376796effda5207dfff30ea6216b8f481439665a89987708d368109233fe0e07d46236ace3d12
7
+ data.tar.gz: 2bb0b1579d55d817779ede9f4a672517a9630f2a84274901018b9d31286cf44541dc3b777cf0377ef482dca68f99bea5ce51ad0113b224a7491fa7cf3fd37cec
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.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.2"
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bulgakke