rubydium 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebfa6d1d46ec5b5d046aae44b857f59b405e5ae79af529d695a552090dc07fc0
4
- data.tar.gz: 00cd4177e06fb2920a5ff6a1b8c3be332bc57cbf473624020704855df07dec07
3
+ metadata.gz: f2a77cb279ad0d586b2d071f893fe2ea50189f016002c1582309698e3b04d447
4
+ data.tar.gz: eda4c5570c608ecdaf31e4731808532b68cc9edd58bda94af3c1d9c08c5e665a
5
5
  SHA512:
6
- metadata.gz: f09704c30374104c0c0cf608ffae1ffad372e2b41317f9a324a6ae1200867393d461fe186ec2f62c5516c38c293ba812ef1016ccf8cab3342a655ca702390358
7
- data.tar.gz: 478056c327c16135dd0a546fc88c53dd345ca5db7b30047b673c6765c0f22d07a54f8b877eae86a18dceef5b4de5c55db6ecb9a7a10fa65df05f4956e18c1c4e
6
+ metadata.gz: ea97d3e9a465f3cd5b47e8b74896d7d60d6c5c4788d3ab967a10d52c3bde820310c4b997f52cb13d1f6da8db6b6fdc725a8efc48f4d8ff7c99ad225a8404479c
7
+ data.tar.gz: adb5e1eeb8cab687442ab398f9c8d26c8f2ab7decab3ae5f3a082581e65d038ab467a146af3e0adf9882212329e4c99501487394d30279a5a38ff6df3c136184
data/lib/rubydium/bot.rb CHANGED
@@ -41,6 +41,7 @@ module Rubydium
41
41
  @command = get_command(@msg.text)
42
42
  @text_without_command = @text.gsub(@command.to_s, '').gsub(/@#{config.bot_username}\b/, '').strip
43
43
  @text_without_bot_mentions = @text.gsub(/@#{config.bot_username}\b/, '')
44
+ @topic_id = @msg.message_thread_id if @chat.is_forum
44
45
  end
45
46
 
46
47
  def handle_update
@@ -7,7 +7,7 @@ module Rubydium
7
7
  def send_message(text)
8
8
  @api.send_message(
9
9
  chat_id: @chat.id,
10
- message_thread_id: @msg.message_thread_id,
10
+ message_thread_id: @topic_id,
11
11
  text: text
12
12
  )
13
13
  end
@@ -17,7 +17,7 @@ module Rubydium
17
17
 
18
18
  @api.send_sticker(
19
19
  chat_id: @chat.id,
20
- message_thread_id: @msg.message_thread_id,
20
+ message_thread_id: @topic_id,
21
21
  sticker: sticker,
22
22
  **kwargs
23
23
  )
@@ -34,7 +34,7 @@ module Rubydium
34
34
  @api.send_chat_action(
35
35
  chat_id: @chat.id,
36
36
  action: action,
37
- message_thread_id: @msg.message_thread_id,
37
+ message_thread_id: @topic_id,
38
38
  **kwargs
39
39
  )
40
40
  end
@@ -44,7 +44,7 @@ module Rubydium
44
44
 
45
45
  @api.send_video(
46
46
  chat_id: @chat.id,
47
- message_thread_id: @msg.message_thread_id,
47
+ message_thread_id: @topic_id,
48
48
  video: video,
49
49
  **kwargs
50
50
  )
@@ -55,7 +55,7 @@ module Rubydium
55
55
 
56
56
  @api.send_photo(
57
57
  chat_id: @chat.id,
58
- message_thread_id: @msg.message_thread_id,
58
+ message_thread_id: @topic_id,
59
59
  photo: photo,
60
60
  **kwargs
61
61
  )
@@ -64,7 +64,7 @@ module Rubydium
64
64
  def reply(text, **args)
65
65
  @api.send_message(
66
66
  chat_id: @chat.id,
67
- message_thread_id: @msg.message_thread_id,
67
+ message_thread_id: @topic_id,
68
68
  reply_to_message_id: @message_id,
69
69
  text: text,
70
70
  **args
@@ -78,7 +78,7 @@ module Rubydium
78
78
  def reply_to_target(text)
79
79
  @api.send_message(
80
80
  chat_id: @chat.id,
81
- message_thread_id: @msg.message_thread_id,
81
+ message_thread_id: @topic_id,
82
82
  reply_to_message_id: @replies_to.message_id,
83
83
  text: text
84
84
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubydium
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.5"
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.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bulgakke