Skip to content

Commit

Permalink
Pretend that DM messages were really addressed to us
Browse files Browse the repository at this point in the history
  • Loading branch information
grantmd authored and paulhammond committed Dec 8, 2014
1 parent 101f526 commit 9386ffa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/slack.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ class SlackBot extends Adapter

@robot.logger.debug "Received message: '#{txt}' in channel: #{channel.name}, from: #{user.name}"

# If this is a DM, pretend it was addressed to us
if msg.getChannelType() == 'DM'
txt = "#{@robot.name} #{txt}"

@receive new TextMessage user, txt, msg.ts

send: (envelope, messages...) ->
Expand Down

0 comments on commit 9386ffa

Please sign in to comment.