Sha256: 97113c050d48f397432fbc4c8405d583e8cbc13a1c954dca8d298a17b4da2182
Contents?: true
Size: 701 Bytes
Versions: 3
Compression:
Stored size: 701 Bytes
Contents
class SlackSmartBot def answer(user = Thread.current[:user], dest = Thread.current[:dest]) if user.is_a?(String) if user.match?(/^[A-Z0-9]{7,11}_/) from = user else from = "#{config.team_id}_#{user}" end else from = "#{user.team_id}_#{user.name}" end if @answer.key?(from) if Thread.current[:on_thread] dest = Thread.current[:thread_ts] end if @answer[from].key?(dest) return @answer[from][dest] else return '' end else return '' end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
slack-smart-bot-1.15.25 | lib/slack/smart-bot/utils/answer.rb |
slack-smart-bot-1.15.1 | lib/slack/smart-bot/utils/answer.rb |
slack-smart-bot-1.15.0 | lib/slack/smart-bot/utils/answer.rb |