slacks 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slacks/connection.rb +13 -1
- data/lib/slacks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47d70d2fd8637b680b0996c328a8bc4e904370a5
|
4
|
+
data.tar.gz: 01e16f46e8f99eef67164cc69b7c80fd5d6be1e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9ee9d64bafcade4b4d692e8364462c2217f5c4847761a565bb491ca8fbc3f05e65205969f10230fba9bc820e25f98cabffd4d1122d3eef30103902065cdaecc
|
7
|
+
data.tar.gz: c73f2491c1af828ce7fa2071f620de5abda68528fe9d40949ae134bb8ee4ea6f79b44be55307b70690f9198d3e28774aea6e5ada296135f170b8daacafa9390f
|
data/lib/slacks/connection.rb
CHANGED
@@ -158,7 +158,19 @@ module Slacks
|
|
158
158
|
|
159
159
|
|
160
160
|
def channels
|
161
|
-
user_id_by_name.keys + group_id_by_name.keys + channel_id_by_name.keys
|
161
|
+
channels = user_id_by_name.keys + group_id_by_name.keys + channel_id_by_name.keys
|
162
|
+
if channels.empty?
|
163
|
+
fetch_channels!
|
164
|
+
fetch_groups!
|
165
|
+
fetch_users!
|
166
|
+
end
|
167
|
+
channels
|
168
|
+
end
|
169
|
+
|
170
|
+
def can_see?(channel)
|
171
|
+
to_channel_id(channel).present?
|
172
|
+
rescue ArgumentError
|
173
|
+
false
|
162
174
|
end
|
163
175
|
|
164
176
|
|
data/lib/slacks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slacks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket-driver
|