wingbot 3.31.4 → 3.31.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.31.4",
3
+ "version": "3.31.5",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Responder.js CHANGED
@@ -528,6 +528,8 @@ class Responder {
528
528
  if (prepend) Object.assign(prep, { _prepend: true });
529
529
  if (justToExisting) Object.assign(prep, { _justToExisting: true });
530
530
 
531
+ const useCa = this.currentAction();
532
+
531
533
  if (actionIsObject) {
532
534
  this._quickReplyCollector.push({
533
535
  ...prep,
@@ -535,7 +537,8 @@ class Responder {
535
537
  data: {
536
538
  ...prep.data,
537
539
  ...data
538
- }
540
+ },
541
+ useCa
539
542
  });
540
543
  } else {
541
544
  this._quickReplyCollector.push({
@@ -543,6 +546,7 @@ class Responder {
543
546
  action: this.toAbsoluteAction(action),
544
547
  title,
545
548
  data,
549
+ useCa,
546
550
  ...prep
547
551
  });
548
552
  }
package/src/Router.js CHANGED
@@ -260,7 +260,7 @@ class Router extends ReducerWrapper {
260
260
  }
261
261
 
262
262
  // used as protected method
263
- async processReducers (reducers, req, res, postBack, path, action, doNotTrack = false) {
263
+ async processReducers (reducers, req, res, postBack, action, doNotTrack = false) {
264
264
  const routeToReduce = {
265
265
  reducers,
266
266
  path: res.routePath
@@ -133,7 +133,8 @@ function makeQuickReplies (replies, path = '', translate = (w) => w, quickReplyC
133
133
  data = {},
134
134
  isLocation = false,
135
135
  isEmail = false,
136
- isPhone = false
136
+ isPhone = false,
137
+ useCa = currentAction
137
138
  } = reply;
138
139
  let {
139
140
  setState = null
@@ -219,7 +220,7 @@ function makeQuickReplies (replies, path = '', translate = (w) => w, quickReplyC
219
220
  payload = {
220
221
  action: absoluteAction,
221
222
  data: {
222
- _ca: currentAction,
223
+ _ca: useCa,
223
224
  ...data
224
225
  }
225
226
  };
@@ -41,7 +41,7 @@ function wrapPluginFunction (
41
41
  return true;
42
42
  }
43
43
  const reducers = preprocessedItems.get(codeBlockName);
44
- return router.processReducers(reducers, req, res, postBack, path, action, true);
44
+ return router.processReducers(reducers, req, res, postBack, action, true);
45
45
  }
46
46
  });
47
47