Permalink
Browse files

Merge pull request #39 from assaf/master

Fix to public room behavior
  • Loading branch information...
atmos committed Oct 26, 2011
2 parents 0ee12dd + f34738d commit 8ea2b178d33d259bc8b35a8a4280f47801eba146
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/hubot/hipchat.coffee
View
@@ -43,7 +43,8 @@ class HipChat extends Robot
bot.onError (message, stanza)->
console.log "Received error from HipChat:", message, stanza
bot.onMessage /^\s*@hubot\s/i, (channel, from, message)->
- author = self.userForId(from.match(/_(\d+)@/)[1])
+ console.log from
+ author = self.userForName(from)
author.room = channel
self.receive new Robot.Message(author, message.replace(/^\s*@hubot\s+/, "Hubot: "))
bot.onPrivateMessage (from, message)=>

0 comments on commit 8ea2b17

Please sign in to comment.