Comparing version 0.29.0-beta.9 to 0.29.0-beta.10
{ | ||
"name": "botnaut", | ||
"version": "0.29.0-beta.9", | ||
"version": "0.29.0-beta.10", | ||
"description": "Facebook Messenger Chatbot Framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -40,3 +40,3 @@ /* | ||
* | ||
* blocks.code('exampleBlock', function* (req, res, postBack, context) { | ||
* blocks.code('exampleBlock', function* (req, res, postBack, context, params) { | ||
* yield res.run('responseBlockName'); | ||
@@ -43,0 +43,0 @@ * }); |
@@ -168,6 +168,7 @@ /* | ||
*/ | ||
function proceedCallback (state, rootPostBack) { | ||
function proceedCallback (state, isText, rootPostBack) { | ||
return function (callbackContext = null) { | ||
if (!state[ACTION] | ||
|| !isText | ||
|| callbackContext === state[CONTEXT] | ||
@@ -202,5 +203,6 @@ || state[ACTION] === `${this.path === '/' ? '' : this.path}${this.routePath}`) { | ||
*/ | ||
function addCallbackQuickReply (state) { | ||
function addCallbackQuickReply (state, isText) { | ||
return function (replyText) { | ||
if (!state[ACTION] | ||
|| !isText | ||
|| state[ACTION] === `${this.path === '/' ? '' : this.path}${this.routePath}`) { | ||
@@ -225,5 +227,7 @@ return this; | ||
const isText = req.isText(); | ||
Object.assign(res, { | ||
addCallbackQuickReply: addCallbackQuickReply(req.state), | ||
proceedCallback: proceedCallback(req.state, postBack), | ||
addCallbackQuickReply: addCallbackQuickReply(req.state, isText), | ||
proceedCallback: proceedCallback(req.state, isText, postBack), | ||
setCallback | ||
@@ -230,0 +234,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3119308
126
8609