hubot-flowdock
hubot-flowdock copied to clipboard
adapter does not honor bot alias
# start the bot with an alias of red
bin/hubot -a flowdock -n hubot -l "red"
[Mon Apr 13 2015 23:49:13 GMT+0000 (UTC)] DEBUG Received message { event: 'message',
tags: [ ':unread:146905' ],
uuid: 'bDe2opT0nhbxr96Q',
to: '146905',
id: 8876770048,
content: 'hubot: time',
sent: 1428968953192,
app: 'chat',
attachments: [],
user: '150031' }
[Mon Apr 13 2015 23:49:13 GMT+0000 (UTC)] DEBUG Message 'hubot: time' matched regex //^\s*[@]?(?:red[:,]?|hubot[:,]?)\s*(?:TIME$)/i/
[Mon Apr 13 2015 23:49:20 GMT+0000 (UTC)] DEBUG Received message { event: 'message',
tags: [ ':unread:146905' ],
uuid: 'OC_b4rSvU0wF_Cft',
to: '146905',
id: 8876770083,
content: 'red: time',
sent: 1428968960047,
app: 'chat',
attachments: [],
user: '150031' }
Not the regexp includes red
in showing that the bot should respond //^\s*[@]?(?:red[:,]?|hubot[:,]?)\s*(?:TIME$)/i/
I wanted to alias my bot name to /
but that is taken by flowdock which is frustrating. In either case, I should be able to alias my bot name to "" or "." so I can run .nagios status
@ChrisLundquist I'm not quite following if this is a separate issue: does this work with 0.7.4
like in #76 or is this a different one?
Yeah, that report was ambiguous. Let me clarify the details I left out.
So the above output was with version 0.7.4 When I use the bot name "hubot" the message is received and the bot replies as expected.
When using 0.7.4 and starting with a bot alias like "-l red" the bot does not respond to "red: help" and the like, but still responds to "hubot: help".
When in debug mode, hubot prints the "respond to" regexp which seemingly contains "red" or'd with hubot.
My wild guess is that it is related to the warning the flow dock adapter issues when the token user name doesn't line up with the bot name.
As a work around, I logged in as the bot and changed the name to "." Then launched the bot with "-n '.'". While I'd rather use an alias this seems to work.
Let me know if there is any more info I can provide.
On Tuesday, April 14, 2015, Otto Vehviläinen [email protected] wrote:
@ChrisLundquist https://github.com/ChrisLundquist I'm not quite following if this is a separate issue: does this work with 0.7.4 like in #76 https://github.com/flowdock/hubot-flowdock/issues/76 or is this a different one?
— Reply to this email directly or view it on GitHub https://github.com/flowdock/hubot-flowdock/issues/77#issuecomment-92883315 .
Yeah, the adapter mangles the messages a bit so that they match the hubot's regexes because the highlights are a bit different. I guess it doesn't really work with aliases so we'll need to investigate how to support that.