Method: Lita::Robot#send_messages_with_mention
- Defined in:
- lib/lita/robot.rb
#send_messages_with_mention(target, *strings) ⇒ void Also known as: send_message_with_mention
This method returns an undefined value.
Sends one or more messages to a user or room. If sending to a room, prefixes each message with the user’s mention name.
141 142 143 144 145 146 147 148 149 150 |
# File 'lib/lita/robot.rb', line 141 def (target, *strings) return (target, *strings) if target. mention_name = target.user.mention_name prefixed_strings = strings.map do |s| "#{adapter.mention_format(mention_name).strip} #{s}" end (target, *prefixed_strings) end |