Method: Redata::Notice#mention
- Defined in:
- lib/redata/notice.rb
#mention(user_name, msg) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/redata/notice.rb', line 22 def mention(user_name, msg) @slack.users_list['members'].each do |user| if user['name'] == user_name @slack.chat_postMessage({ :channel => RED.slack['channel'], :text => "<@#{user['id']}> #{msg}", :as_user => true }) end end end |