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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4655b64b95738df424e627dd671d219ee46c55e3
4
- data.tar.gz: d5f1d21638a975aeb802d17a2b00d814b14579f3
3
+ metadata.gz: 47d70d2fd8637b680b0996c328a8bc4e904370a5
4
+ data.tar.gz: 01e16f46e8f99eef67164cc69b7c80fd5d6be1e5
5
5
  SHA512:
6
- metadata.gz: 5742d45eb577916616ddba1bbe6b2b231ddb501a0795320aa4de58049a037f2f3b16101f4199093c068c4deebcb970f732a752ed050a2213926b422b3eaf5804
7
- data.tar.gz: a1df56de686279475cb65b2fb7b14afe49afe01b407f654eeafa48f3efb109c928d55289ce0e0aacab4e030590ea8241eab1d48d8bc950719704fe1a847ecdc2
6
+ metadata.gz: b9ee9d64bafcade4b4d692e8364462c2217f5c4847761a565bb491ca8fbc3f05e65205969f10230fba9bc820e25f98cabffd4d1122d3eef30103902065cdaecc
7
+ data.tar.gz: c73f2491c1af828ce7fa2071f620de5abda68528fe9d40949ae134bb8ee4ea6f79b44be55307b70690f9198d3e28774aea6e5ada296135f170b8daacafa9390f
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Slacks
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
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.2
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-09-02 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: websocket-driver