Sha256: ac9eabcf27075b38696c9b6b9c18cc87ad1ccc994cc6703bdf6f18baf77618e6
Contents?: true
Size: 528 Bytes
Versions: 17
Compression:
Stored size: 528 Bytes
Contents
class SlackSmartBot def get_presence(user) begin if user.to_s.length>0 if config.simulate and config.key?(:client) if user[0]=='@' #name client.web_client.users_get_presence.select{|k, v| v[:name] == user[1..-1]}.values[-1] else #id client.web_client.users_get_presence[user.to_sym] end else client.web_client.users_getPresence(user: user) end end rescue Exception => stack @logger.warn stack end end end
Version data entries
17 entries across 17 versions & 1 rubygems