lita-irc 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/irc.rb +4 -4
- data/lita-irc.gemspec +1 -1
- data/spec/lita/adapters/irc_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: 7f6bcd5ab576ecbe1570ede78cde8a1adf99d0ae
|
4
|
+
data.tar.gz: 9f47d348b44fd21011c85b6959d8b6d14b3b9cbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c73638cfc160a3f1271b1595dc580cd973bcd280d6db4807a741e0c870470169acb7c1841337b02eaf883d30a58a1a2f1ed9b9c9dd93df08b78a2245ee0605a0
|
7
|
+
data.tar.gz: 84d8135f94be890ae7a477e1f7deacd442f26b99d74a32406478c2663ce1dc88deddf408e04a9a80da1fdf5c53014ee19c83c79052a59c869c3100ea797612c6
|
data/lib/lita/adapters/irc.rb
CHANGED
@@ -26,12 +26,12 @@ module Lita
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def send_messages(target, strings)
|
29
|
-
if target.
|
30
|
-
channel = Cinch::Channel.new(target.room, cinch)
|
31
|
-
strings.each { |s| channel.msg(s) }
|
32
|
-
else
|
29
|
+
if target.private_message?
|
33
30
|
user = Cinch::User.new(target.user.name, cinch)
|
34
31
|
strings.each { |s| user.msg(s) }
|
32
|
+
else
|
33
|
+
channel = Cinch::Channel.new(target.room, cinch)
|
34
|
+
strings.each { |s| channel.msg(s) }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
data/lita-irc.gemspec
CHANGED
@@ -59,7 +59,7 @@ describe Lita::Adapters::IRC, lita: true do
|
|
59
59
|
|
60
60
|
describe "#send_messages" do
|
61
61
|
it "sends messages to rooms" do
|
62
|
-
source = double("Lita::Source", room: "#foo")
|
62
|
+
source = double("Lita::Source", room: "#foo", private_message?: false)
|
63
63
|
channel = double("Cinch::Channel")
|
64
64
|
allow(Cinch::Channel).to receive(:new).with(
|
65
65
|
"#foo",
|
@@ -72,7 +72,7 @@ describe Lita::Adapters::IRC, lita: true do
|
|
72
72
|
|
73
73
|
it "sends messages to users" do
|
74
74
|
user = double("Lita::User", name: "Carl")
|
75
|
-
source = double("Lita::Source",
|
75
|
+
source = double("Lita::Source", user: user, private_message?: true)
|
76
76
|
user = double("Cinch::User")
|
77
77
|
allow(Cinch::User).to receive(:new).with(
|
78
78
|
"Carl",
|