watson-developer-cloud / conversation-connector

The Conversation connector is a set of components that mediate communication between your Conversation workspace and a Slack or Facebook app. Use the connector to deploy a chat bot that Slack or Facebook Messenger users can interact with.
Apache License 2.0
28 stars 62 forks source link

Support for pause response type #41

Closed aarora91 closed 6 years ago

aarora91 commented 6 years ago

Added support for a "pause" response from Conversation which looks like the following:

{
"response_type": "pause",
"time": "1000",
"typing": true
}

Facebook normalizer handles it by adding a sender_action payload as follows:

{
"sender_action": "typing_on",
"time": "1000"
}

Slack Events API currently does not have support for typing events so the normalizer will simply sleep for the specified time duration before sending the subsequent response(s).