Sha256: e8d50f6f07c06fb64cf945c48939e7166cc324a743f1aba83d8f551b9ee09c1b

Contents?: true

Size: 418 Bytes

Versions: 2

Compression:

Stored size: 418 Bytes

Contents

class SlackSmartBot

  def get_user_info(user)
    if user.to_s.length>0
      if config.simulate and config.key?(:client)
        if user[0]=='@' #name
          client.web_client.users_info.select{|k, v| v[:user][:name] == user[1..-1]}.values[-1]
        else #id
          client.web_client.users_info[user.to_sym]
        end
      else
        client.web_client.users_info(user: user)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack-smart-bot-1.9.2 lib/slack/smart-bot/comm/get_user_info.rb
slack-smart-bot-1.9.1 lib/slack/smart-bot/comm/get_user_info.rb