Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Fix bot.replyPrivateDelayed. https://github.com/howdyai/botkit/issu… #446

Closed

Conversation

sundeepgupta
Copy link
Contributor

@sundeepgupta sundeepgupta commented Oct 16, 2016

…es/444

I discovered this when trying to ephemerally respond to an interactive button click. We need to set replace_original to false in order for our reply to be ephemeral. Otherwise, it will reply publicly. Furrther, when responding to an ephemeral message's button click, currently we cannot update it. Thus, introduce new method to provide the option to update or not. The existing one could be depcrecated.

@sundeepgupta
Copy link
Contributor Author

sundeepgupta commented Oct 27, 2016

Running into this again today. If we want to update an ephemeral interactive message, we need to be able to set msg.replace_original = true. I see three options to fix this...

  1. Add API with something like replyPrivateDelayedReplace.
  2. Change existing API by requiring a replace_original argument for replyPrivateDelayed. We could make this non-breaking by checking the arguments.
  3. Deprecate replyPrivateDelayed in favour of replyPrivateDelayed2 (can't think of a name right now :)) which takes the additinal replace_original argument.

I imagine the same will need to be done for replyPublic, replyPublicDelayed, and replyPrivate as well.

I discovered this when trying to ephemerally respond to an interactive button click. We need to set `replace_original` to `false` in order for our reply to be ephemeral. Otherwise, it will reply publicly. Furrther, when responding to an ephemeral message's button click, currently we cannot update it. Thus, introduce new method to provide the option to update or not. The existing one could be depcrecated.
@benbrown
Copy link
Contributor

benbrown commented Nov 7, 2016

Hey @sundeepgupta - I am not clear why we need a whole new function for this.

You can pass in the replace_original field as part of the parameter to replyPrivateDelayed...

bot.replyPrivateDelayed(incoming_message, {text: 'foo', replace_original: false});

@sundeepgupta
Copy link
Contributor Author

@benbrown not sure why i didn't see that.. my bad!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants