atmos / hubot-gtalk

GTalk adapter for Hubot
MIT License
14 stars 6 forks source link

Better name prefixing #16

Closed noazark closed 12 years ago

noazark commented 12 years ago

#handleMessage previously didn't match against the robot's alias.

$ hubot -a gtalk -n hubot --alias huey
...
hubot> huey help
  # prefixing results in: hubot huey help

In this case, aliases would never worked. The fix was just to use the robot's matchers, as seen in robot.coffee line 78, slightly modified so they don't concern themselves with the message pattern.

Also added a conditional to only prefix if the message's type is 'chat' (as opposed to groupchat or something). This is specifically for use along side #15, but doesn't break anything w/o that pull.