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 +4 -4
- data/lib/lita/adapters/hipchat.rb +3 -3
- data/lita-hipchat.gemspec +1 -1
- data/spec/lita/adapters/hipchat_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89e2938eea4a03354a85c293c1384373e6ccab32
|
4
|
+
data.tar.gz: 2d644e6f4743c2fd47071e9655c2f264bef0e98f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
@@ -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",
|
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!"]
|