When using postback, postback sometimes sends back response for itself and button text value.

Pre condition, Condition to reproduce

Issue/ Error Message details

I have 2 skills, one called 'greeting' which when invoked will return random greetings like 'hey!' and another one called 'singleCard' which will return a single card with an image, title and subtitle. Now, when I set a button with the display text as 'greeting' and give it a postback value of 'singleCard' I sometimes, and very randomly, get a response for both skills instead of JUST the postback value 'singleCard' given to the button. This means LINE is sending both the value of the display text AND the postback button at times, when its only supposed to be sending the postback value. Has anyone else encountered this issue, and if so, how did you solve it?

Accompanying respective source code

Resolution Tried

I'm using Node JS so I've tried setting its timeout method and trying catch the second response for the display text but since i'm trying to see if it happens for EVERY request it adds overhead time which isn't desirable for production code.

Reference information (Version / Platform/ environment)

Node JS, Messaging API

  • 0
  • 1
  • 1406
  • twitter facebook

Found out that I was using the deprecated version to display text. I was using text when instead should have been using displayText when passing text to my dialog flow.

  • 0

Similar posts

    No similar posts

Are you sure? question.vm