slack-rtm-bot-helper 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 9b58e4b64f1453466b18c928a2b05ec29c87505e
4
- data.tar.gz: a81c51c70b783ba18847e334cb6a818ed7207060
3
+ metadata.gz: c8a6e53c9ffe02db37db6db739a398746bc5f54f
4
+ data.tar.gz: 5020a8b3473e2a5cb6776e43f90541d74517e38c
5
5
  SHA512:
6
- metadata.gz: 725d1aabb7671925b3f975cf77ced749b9e623a9d579802f99b8cf05deb7c359f29cd7d33d149fb25e069cd5b26cb202f20e0931204e68fc2125e18ebe4a83b4
7
- data.tar.gz: 9cdcdbad412fbf9725281abd38de40a4392748a408ae05392181f3b915d5b6124706022172159016a1c1147eb692c996ca428395816bcd9016889d2f8da9a5ce
6
+ metadata.gz: fa9957b95082f8ad1519a5c6e84cd4a54422af8def4d644374bf4932d1d37e3b8fa66370af9bbb59433a9b19939f592119b864e8fabbdec1850162d507a05828
7
+ data.tar.gz: 711c16c6962336d9abd5421ca9e6b243266741ca175fd50149b617ff7c969e884f5279c2a41e05f5d77b4acb5b9c86d7fd4f651d577748011eafce4d3bd66e79
@@ -13,6 +13,7 @@ module Slack
13
13
  @token = token
14
14
  @channel = channel
15
15
  @message_block = message_block
16
+ @name = name
16
17
  @me = me_id(token, name) unless name.nil?
17
18
 
18
19
  @id = 1
@@ -49,7 +50,7 @@ module Slack
49
50
  end
50
51
 
51
52
  def to_me?(text)
52
- text.match?(/^<@#{@me}/)
53
+ text.match?(/^<@#{@me}(?:#{@name})?/)
53
54
  end
54
55
 
55
56
  private
@@ -2,7 +2,7 @@ module Slack
2
2
  module Rtm
3
3
  module Bot
4
4
  class Helper
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-rtm-bot-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - littlekbt