nandub/hubot-irc — Issue #2: Receiving
Author: ajacksified
Created: 2011-11-29 19:59:37+00:00
State: open

Not sure why, but I've figured out that on receive, the base robot.receive does not see the incoming message as an instance of Robot.TextMessage. I added

if !(message instanceof Robot.TextMessage)
message = new Robot.TextMessage(message.user, message.text)

To the robot.coffee, which fixed it, but obviously looks wrong. The code in the IRC module does create an instance of Robot.TextMessage, but maybe someone with more node / coffeescript experience has an idea?

Other than that, the module works great.