ruboty-slack_rtm 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 +4 -4
- data/lib/ruboty/adapters/slack_rtm.rb +3 -1
- data/lib/ruboty/slack_rtm/version.rb +1 -1
- 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: 718c5fe60cd112fc3e5f9f1ace971c856e78f12d
|
4
|
+
data.tar.gz: 266e861ed9767c9617ece2370252ef9b8c74796b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e3b241f0ae37e7484aa02a7134e429327e51ede86c6874aa78d5475a4fa6497bd8bc66765bd818270158699de6169e2794973d5d5cc967724accab0edc2ff7
|
7
|
+
data.tar.gz: 78fe9e8cee1514c7dc053d6acaeadcd59e8c1a1f33dcf3787e5c8d81a23b946af54609c68092dcb9fd8ec05db7c5cf01b421764c5376dcd3fbf017586b0e2477
|
@@ -74,7 +74,7 @@ module Ruboty
|
|
74
74
|
|
75
75
|
def on_message(data)
|
76
76
|
data = resolve_mention!(data)
|
77
|
-
user = user_info(data['user'])
|
77
|
+
user = user_info(data['user']) || {}
|
78
78
|
|
79
79
|
robot.receive(
|
80
80
|
body: data['text'],
|
@@ -199,6 +199,8 @@ module Ruboty
|
|
199
199
|
end
|
200
200
|
|
201
201
|
def user_info(user_id)
|
202
|
+
return {} if user_id.to_s.empty?
|
203
|
+
|
202
204
|
@user_info_caches[user_id] ||= begin
|
203
205
|
resp = client.users_info(user: user_id)
|
204
206
|
|