How to address a user's 1:1 flow?
wenslayer opened this issue · 1 comments
wenslayer commented
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.
AveryRegier commented
robot.respond /tell me a secret/i, (res) ->
robot.send {user: res.envelope.user}, 'whisper, whisper, whisper'
- Avery
… On Feb 21, 2018, at 7:08 PM, Marc Wensauer ***@***.***> wrote:
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.