wingbot 3.74.1 → 3.74.3

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.74.1",
3
+ "version": "3.74.3",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
@@ -496,7 +496,7 @@ class ReturnSender {
496
496
  this._intentsAndEntities
497
497
  .forEach((aiObj) => {
498
498
  // expected input
499
- if (aiObj && aiObj.type) {
499
+ if (aiObj && (aiObj.type || aiObj.max_length)) {
500
500
  input = aiObj;
501
501
  return;
502
502
  }
@@ -583,7 +583,7 @@ class ReturnSender {
583
583
  if (Array.isArray(payload.expectedIntentsAndEntities)) {
584
584
  this._intentsAndEntities.push(...payload.expectedIntentsAndEntities);
585
585
  this._sendLastMessageWithFinish = this._sendLastMessageWithFinish
586
- || this._intentsAndEntities.some((e) => e && e.type);
586
+ || this._intentsAndEntities.some((e) => e && (e.type || e.max_length));
587
587
  return;
588
588
  }
589
589
 
@@ -19,7 +19,7 @@ function expectedInput ({ type = null, confident = false, maxLength = null }, {
19
19
 
20
20
  if (confident) {
21
21
  res.expectedConfidentInput(type);
22
- } else if (type) {
22
+ } else if (type || useMaxLen) {
23
23
  res.expectedInput(type, opts);
24
24
  }
25
25