hipchat_smart 1.1.0 → 1.1.1
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 +4 -4
- data/lib/hipchat_smart.rb +12 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 539d3618ee7ad2f682d990317836fe39bd6ae492349265c6d1e86b617318abee
|
4
|
+
data.tar.gz: f5ffa4d7fe595f30566b4e1eab030b0ec3051069c61c4a408017bb6922b15f67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e6fd5b5dceb1246a9676ccfc23325d20af2e2cc59235eedf2fb9be122f8924c6d78e161496a68b8d7411325cf55b8e41d2d59100a8ab61e6b2e677618e50e4f
|
7
|
+
data.tar.gz: f89f48c3aab377014d2f404f9c7275cb7691c28bf693759d0eef5535c0f00ad589841dcf7b3797de941b83966f6f3900aa9f18b8b157448498a1ad16f73a9a32
|
data/lib/hipchat_smart.rb
CHANGED
@@ -152,16 +152,18 @@ class Bot
|
|
152
152
|
roster.accept_subscription(pres.from)
|
153
153
|
end
|
154
154
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
155
|
+
if ON_MASTER_ROOM
|
156
|
+
client.add_message_callback do |m|
|
157
|
+
unless m.body.to_s==""
|
158
|
+
jid_user=m.from.node+"@"+m.from.domain
|
159
|
+
user=roster[jid_user]
|
160
|
+
unless user.nil?
|
161
|
+
res = process_first("", user.attributes["name"], m.body, jid_user)
|
162
|
+
next if res.to_s=="next"
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
165
167
|
|
166
168
|
@logger.info "Bot listening"
|
167
169
|
self
|