Closed DannyBen closed 1 year ago
I think you're looking for https://github.com/slack-ruby/slack-ruby-client/blob/master/UPGRADING.md#realtime-stores. Swap the store for https://github.com/slack-ruby/slack-ruby-client#slackrealtimestoresstore, do you get everything you need back?
do you get everything you need back?
Yes! (probably...)
Adding this helped:
Slack::RealTime::Client.configure do |config|
config.store_class = Slack::RealTime::Stores::Store
config.store_options = { caches: :all }
end
I am still getting empty hashes for bots
, private_channels
and public_channels
- but this is probably a visibility issue for my token. Users list returns properly.
Thank you.
@DannyBen beware of how long these APIs take to return. If you have a large team this may be problematic. Curious how you use this?
Thanks for engaging.
I am using it in my slacktail gem - which just shows every message posted in the terminal.
I will probably also add this extension, to bring back channels
:
class Slack::RealTime::Client
def channels
@channels ||= public_channels.merge(private_channels)
end
end
I am trying to find out what is the new way of doing things that used to work in 1.1.0 but not working in 2.x.
These methods:
RealTime::Client#users
RealTime::Client#bots
RealTime::Client#channels
no longer work for me in 2.0. I am guessing it has something to do with
Slack::RealTime::Client#start_async
?Reproduction: