question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

postback while in conversation do nothing

See original GitHub issue

Currently, when a user clicks on a button the bot doesn’t respond on the first time, the user should click twice to execute the postback action

bot: what is your name?
user: Charca
bot: and your age?
user: <click on About button>
bot: (do nothing)
user: <click on About button>
bot: I am a bot that helps you order food

How to close the conversation and execute the postback function when a user clicks on a button?

bot: what is your name?
user: Charca
bot: and your age?
user: <click on About button>
bot: I am a bot that helps you order food

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

4reactions
mmaylacommented, Jun 18, 2017

Thanks @tmwd I have found a better way to catch all postbacks without rewriting all of the postbacks names

const callbacks = [{
  event: 'postback',
  callback: (payload, convo, data) => {
    convo.end();
    bot._handleEvent(`postback:${payload.postback.payload}`, payload);
  }
}];
1reaction
mmaylacommented, Nov 26, 2017

@mraaroncruz yeah you can close it 😃 I think the issue is solved, now a postback event doesn’t break a conversation and to break a conversation when the user clicks on a button you should catch it and close the conversation yourself which I think a good design.

Thanks, @mraaroncruz 😸

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent page postback when user hits enter - Stack Overflow
Here's the thing: when the user clicks on the form, a control will be focused (my mouse pointer changes into the one for...
Read more >
How to get postback action & data back in conversation flow ...
Hi All, I am using Carousel Template to display result within message node. I have 2 postback type buttons in this template. How...
Read more >
Postback | AppsFlyer mobile glossary
In mobile app marketing, a postback contains data that is sent from attribution providers ... As you can see, no piece of data...
Read more >
Chapter 5. Conversations and workspace management
Any faces request (a JSF postback) will propagate the conversation context. ... This even works when there is no long-running conversation since Seam ......
Read more >
avoid postback related page refresh, but use the click event
User-738924622 posted. Hi,. A tricky problem: I want to use a LinkButton on a page. When the user clicks that button, then the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found