flowdock/hubot-flowdock

How to address a user's 1:1 flow?

wenslayer opened this issue · 1 comments

Use case: user writes a message in a (public, non-1:1) flow that triggers a Hubot script that wants to send them information privately (especially anything secret). However, I can't seem to figure out how to configure the bot to send a message to a user's 1:1 flow.

I.e.: this doesn't work:

  robot.respond /gimme sekrit$/i, (res) ->
    robot.send({room: res.message.user.name}, "Here's your sekrit!")

Note that the user can still message hubot directly within a 1:1 flow work, it's when they issue that keyword in a regular flow that I need the response to be sent to the 1:1 flow of the message author.

Thanks for any help.