flowdock / hubot-flowdock

Flowdock adapter for Hubot chat bot
94 stars 60 forks source link

hubot responds to his own messages on flowdock #15

Closed kdulzo closed 11 years ago

kdulzo commented 11 years ago

return if @robot.name == author.name

robot is never set in the class. I suspect at minimum it needs a constructor (that's how I fixed it for now).

Mumakil commented 11 years ago

Flowdock adapter extends the hubot adapter class, which sets the @robot in the constructor (https://github.com/github/hubot/blob/master/src/adapter.coffee). Are you setting the name of the robot correctly when starting it? Notice also that the name is case sensitive.

kdulzo commented 11 years ago

Right, I thought the same thing regarding extending. I'm no js expert, so just stumbled through it. However in troubleshooting by adding some logging, @robot is null in the Flowdock class. So I just tried adding a constructor to Flowdock and it works (see kdulzo/hubot-flowdock@c6d019f0f).

Perhaps there is some other OO foo in JS I'm missing to fix it correctly, but it certainly failed in my case until I made Flowdock have a working @robot.

Mumakil commented 11 years ago

Can you tell me which versions of hubot and flowdock adapter are you using so we can try to triangulate what's wrong?

anttipitkanen commented 11 years ago

This should be resolved by the pull request mentioned above.