botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

IntentDialog matches against FB quick_replies payload instead of FB message title

Open MironV opened this issue 10 years ago • 4 comments

If you have a FB message that comes from a quick_reply, it seems like the IntentDialog matches against the "payload" instead of matching against the "title" text the user actually sees. Since it is a quick_reply, it's meant to be a shortcut to text that would be typed by the user anyway, so it should allow matching against that.

MironV avatar Aug 06 '16 08:08 MironV

This is By Design... So this works the way it does to align with the way Keyboards work on other channels like Kik or Telegram. On those other channels only the payload is sent. The label may be show to the user but never sent. We map the quick reply payload on Facebook to be the message.text for consistency purposes. These are essentially postBack actions for us which are always the payload.

Stevenic avatar Aug 06 '16 19:08 Stevenic

Ah, got it. It's not a huge deal--I was using payload for additional info but I think I can munge it so it works.

MironV avatar Aug 06 '16 19:08 MironV

You can bind them to actions if you use the dialogAction() method or just put "action?<action_name>=" for your payload. You can look at the facebook demo bot I posted yesterday for an example of this. This is how I bind persistent menu buttons to actions.

You can't easily bind buttons to a LUIS model although I'm planning to let you bind an action to an Intent and LuisRecognizer

Stevenic avatar Aug 06 '16 19:08 Stevenic

action?<action_name>=<data>

Stevenic avatar Aug 06 '16 19:08 Stevenic