lita-hipchat 1.2.2 → 1.2.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
  SHA1:
3
- metadata.gz: 6a0923fe726e8ac5adbb877804f95380c1726b88
4
- data.tar.gz: c6427a2dae397b22d7a088111ea14846c14abe1a
3
+ metadata.gz: 89e2938eea4a03354a85c293c1384373e6ccab32
4
+ data.tar.gz: 2d644e6f4743c2fd47071e9655c2f264bef0e98f
5
5
  SHA512:
6
- metadata.gz: 2ce635ea669f2b7aae77694f6f04dc19e18fd7d91b074b6d747ba45ffc6bc37ac5af51c1a21556b2c502d45d3a680c80e63ec3aa2d29d2631d3121f6ce483bf7
7
- data.tar.gz: 2358fbf69d5908ec893cd05b9b5e05cd8256ffe1b1b4674b104a16d56ede51f20ebb20061c6dab95e51db1c3e2656f7a62f656d000fe82b907e828e118333942
6
+ metadata.gz: 6ca54acaf5c548caa4b97a8d1df9c3a6112f15c56efca24b56a55f63710edc05846511beea69d1f4a076bc9a16758e413a6cd1bca8bcde51c6ebfa40d498e1aa
7
+ data.tar.gz: 3f3f44376a876f85bf19a8b984a10e01252e4a876a2790463fa9e64d70d91871c5aa86a5baef9e0c81013f13d25b228fb89ef24cbd2f05b7467d17c5e34b208f
@@ -31,10 +31,10 @@ module Lita
31
31
  end
32
32
 
33
33
  def send_messages(target, strings)
34
- if target.room
35
- connector.message_muc(target.room, strings)
36
- else
34
+ if target.private_message?
37
35
  connector.message_jid(target.user.id, strings)
36
+ else
37
+ connector.message_muc(target.room, strings)
38
38
  end
39
39
  end
40
40
 
data/lita-hipchat.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-hipchat"
3
- spec.version = "1.2.2"
3
+ spec.version = "1.2.3"
4
4
  spec.authors = ["Jimmy Cuadra"]
5
5
  spec.email = ["jimmy@jimmycuadra.com"]
6
6
  spec.description = %q{A HipChat adapter for Lita.}
@@ -87,7 +87,7 @@ describe Lita::Adapters::HipChat do
87
87
 
88
88
  describe "#send_messages" do
89
89
  it "sends messages to rooms" do
90
- source = double("Lita::Source", room: "room_id")
90
+ source = double("Lita::Source", room: "room_id", private_message?: false)
91
91
  expect(subject.connector).to receive(:message_muc).with(
92
92
  "room_id",
93
93
  ["Hello!"]
@@ -97,7 +97,7 @@ describe Lita::Adapters::HipChat do
97
97
 
98
98
  it "sends private messages to users" do
99
99
  user = double("Lita::User", id: "user_id")
100
- source = double("Lita::Source", room: nil, user: user)
100
+ source = double("Lita::Source", user: user, private_message?: true)
101
101
  expect(subject.connector).to receive(:message_jid).with(
102
102
  "user_id",
103
103
  ["Hello!"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-hipchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Cuadra